frida-java-bridge 6.3.4 → 6.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/android.js +28 -10
- package/lib/jvm.js +222 -173
- package/package.json +1 -1
package/lib/android.js
CHANGED
|
@@ -187,7 +187,11 @@ function _getApi () {
|
|
|
187
187
|
},
|
|
188
188
|
// Android >= 6
|
|
189
189
|
_ZN3art9JavaVMExt12DecodeGlobalEPNS_6ThreadEPv: ['art::JavaVMExt::DecodeGlobal', 'pointer', ['pointer', 'pointer', 'pointer']],
|
|
190
|
-
|
|
190
|
+
|
|
191
|
+
// makeDecodeGlobalFallback() uses:
|
|
192
|
+
// Android >= 15
|
|
193
|
+
_ZNK3art6Thread19DecodeGlobalJObjectEP8_jobject: ['art::Thread::DecodeJObject', 'pointer', ['pointer', 'pointer']],
|
|
194
|
+
// Android < 6
|
|
191
195
|
_ZNK3art6Thread13DecodeJObjectEP8_jobject: ['art::Thread::DecodeJObject', 'pointer', ['pointer', 'pointer']],
|
|
192
196
|
|
|
193
197
|
// Android >= 6
|
|
@@ -314,6 +318,7 @@ function _getApi () {
|
|
|
314
318
|
'_ZN3art9JavaVMExt12AddGlobalRefEPNS_6ThreadEPNS_6mirror6ObjectE',
|
|
315
319
|
'_ZN3art9JavaVMExt12DecodeGlobalEPv',
|
|
316
320
|
'_ZN3art9JavaVMExt12DecodeGlobalEPNS_6ThreadEPv',
|
|
321
|
+
'_ZNK3art6Thread19DecodeGlobalJObjectEP8_jobject',
|
|
317
322
|
'_ZNK3art6Thread13DecodeJObjectEP8_jobject',
|
|
318
323
|
'_ZN3art10ThreadList10SuspendAllEPKcb',
|
|
319
324
|
'_ZN3art10ThreadList10SuspendAllEv',
|
|
@@ -489,7 +494,7 @@ function _getApi () {
|
|
|
489
494
|
temporaryApi['art::JavaVMExt::AddGlobalRef'] = makeAddGlobalRefFallbackForAndroid5(temporaryApi);
|
|
490
495
|
}
|
|
491
496
|
if (temporaryApi['art::JavaVMExt::DecodeGlobal'] === undefined) {
|
|
492
|
-
temporaryApi['art::JavaVMExt::DecodeGlobal'] =
|
|
497
|
+
temporaryApi['art::JavaVMExt::DecodeGlobal'] = makeDecodeGlobalFallback(temporaryApi);
|
|
493
498
|
}
|
|
494
499
|
if (temporaryApi['art::ArtMethod::PrettyMethod'] === undefined) {
|
|
495
500
|
temporaryApi['art::ArtMethod::PrettyMethod'] = temporaryApi['art::ArtMethod::PrettyMethodNullSafe'];
|
|
@@ -1889,21 +1894,27 @@ function ensureArtKnowsHowToHandleReplacementMethods (vm) {
|
|
|
1889
1894
|
const apiLevel = getAndroidApiLevel();
|
|
1890
1895
|
|
|
1891
1896
|
const mayUseCollector = (apiLevel > 28)
|
|
1892
|
-
?
|
|
1897
|
+
? (type) => {
|
|
1898
|
+
const impl = Module.findExportByName('libart.so', '_ZNK3art2gc4Heap15MayUseCollectorENS0_13CollectorTypeE');
|
|
1899
|
+
if (impl === null) {
|
|
1900
|
+
return false;
|
|
1901
|
+
}
|
|
1902
|
+
return new NativeFunction(impl, 'bool', ['pointer', 'int'])(getApi().artHeap, type);
|
|
1903
|
+
}
|
|
1893
1904
|
: () => false;
|
|
1894
1905
|
const kCollectorTypeCMC = 3;
|
|
1895
1906
|
|
|
1896
|
-
if (mayUseCollector(
|
|
1907
|
+
if (mayUseCollector(kCollectorTypeCMC)) {
|
|
1897
1908
|
Interceptor.attach(Module.getExportByName('libart.so', '_ZN3art6Thread15RunFlipFunctionEPS0_b'), artController.hooks.Gc.runFlip);
|
|
1898
1909
|
} else {
|
|
1899
|
-
let
|
|
1910
|
+
let copyingPhase = null;
|
|
1900
1911
|
if (apiLevel > 28) {
|
|
1901
|
-
|
|
1912
|
+
copyingPhase = Module.findExportByName('libart.so', '_ZN3art2gc9collector17ConcurrentCopying12CopyingPhaseEv');
|
|
1902
1913
|
} else if (apiLevel > 22) {
|
|
1903
|
-
|
|
1914
|
+
copyingPhase = Module.findExportByName('libart.so', '_ZN3art2gc9collector17ConcurrentCopying12MarkingPhaseEv');
|
|
1904
1915
|
}
|
|
1905
|
-
if (
|
|
1906
|
-
Interceptor.attach(
|
|
1916
|
+
if (copyingPhase !== null) {
|
|
1917
|
+
Interceptor.attach(copyingPhase, artController.hooks.Gc.copyingPhase);
|
|
1907
1918
|
}
|
|
1908
1919
|
}
|
|
1909
1920
|
}
|
|
@@ -3848,8 +3859,15 @@ function makeAddGlobalRefFallbackForAndroid5 (api) {
|
|
|
3848
3859
|
};
|
|
3849
3860
|
}
|
|
3850
3861
|
|
|
3851
|
-
function
|
|
3862
|
+
function makeDecodeGlobalFallback (api) {
|
|
3863
|
+
/*
|
|
3864
|
+
* Fallback for art::JavaVMExt::DecodeGlobal, which is
|
|
3865
|
+
* unavailable in Android versions <= 5 and >= 15.
|
|
3866
|
+
*/
|
|
3852
3867
|
const decode = api['art::Thread::DecodeJObject'];
|
|
3868
|
+
if (decode === undefined) {
|
|
3869
|
+
throw new Error('art::Thread::DecodeJObject is not available; please file a bug');
|
|
3870
|
+
}
|
|
3853
3871
|
|
|
3854
3872
|
return function (vm, thread, ref) {
|
|
3855
3873
|
return decode(thread, ref);
|
package/lib/jvm.js
CHANGED
|
@@ -51,184 +51,226 @@ function _getApi () {
|
|
|
51
51
|
flavor: 'jvm'
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
-
const pending =
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
:
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
54
|
+
const pending = Process.platform === 'windows'
|
|
55
|
+
? [{
|
|
56
|
+
module: vmModule.path,
|
|
57
|
+
functions: {
|
|
58
|
+
JNI_GetCreatedJavaVMs: ['JNI_GetCreatedJavaVMs', 'int', ['pointer', 'int', 'pointer']],
|
|
59
|
+
JVM_Sleep: ['JVM_Sleep', 'void', ['pointer', 'pointer', 'long']],
|
|
60
|
+
'VMThread::execute': ['VMThread::execute', 'void', ['pointer']],
|
|
61
|
+
'Method::size': ['Method::size', 'int', ['int']],
|
|
62
|
+
'Method::set_native_function': ['Method::set_native_function', 'void', ['pointer', 'pointer', 'int']],
|
|
63
|
+
'Method::clear_native_function': ['Method::clear_native_function', 'void', ['pointer']],
|
|
64
|
+
'Method::jmethod_id': ['Method::jmethod_id', 'pointer', ['pointer']],
|
|
65
|
+
'ClassLoaderDataGraph::classes_do': ['ClassLoaderDataGraph::classes_do', 'void', ['pointer']],
|
|
66
|
+
'NMethodSweeper::sweep_code_cache': ['NMethodSweeper::sweep_code_cache', 'void', []],
|
|
67
|
+
'OopMapCache::flush_obsolete_entries': ['OopMapCache::flush_obsolete_entries', 'void', ['pointer']]
|
|
68
|
+
},
|
|
69
|
+
variables: {
|
|
70
|
+
'VM_RedefineClasses::`vftable\'': function (address) {
|
|
71
|
+
this.vtableRedefineClasses = address;
|
|
72
|
+
},
|
|
73
|
+
'VM_RedefineClasses::doit': function (address) {
|
|
74
|
+
this.redefineClassesDoIt = address;
|
|
75
|
+
},
|
|
76
|
+
'VM_RedefineClasses::doit_prologue': function (address) {
|
|
77
|
+
this.redefineClassesDoItPrologue = address;
|
|
78
|
+
},
|
|
79
|
+
'VM_RedefineClasses::doit_epilogue': function (address) {
|
|
80
|
+
this.redefineClassesDoItEpilogue = address;
|
|
81
|
+
},
|
|
82
|
+
'VM_RedefineClasses::allow_nested_vm_operations': function (address) {
|
|
83
|
+
this.redefineClassesAllow = address;
|
|
84
|
+
},
|
|
85
|
+
'NMethodSweeper::_traversals': function (address) {
|
|
86
|
+
this.traversals = address;
|
|
87
|
+
},
|
|
88
|
+
'NMethodSweeper::_should_sweep': function (address) {
|
|
89
|
+
this.shouldSweep = address;
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
optionals: [
|
|
93
|
+
]
|
|
94
|
+
}]
|
|
95
|
+
// If platform is not Windows
|
|
96
|
+
: [{
|
|
97
|
+
module: vmModule.path,
|
|
98
|
+
functions: {
|
|
99
|
+
JNI_GetCreatedJavaVMs: ['JNI_GetCreatedJavaVMs', 'int', ['pointer', 'int', 'pointer']],
|
|
100
|
+
|
|
101
|
+
_ZN6Method4sizeEb: ['Method::size', 'int', ['int']],
|
|
102
|
+
_ZN6Method19set_native_functionEPhb: ['Method::set_native_function', 'void', ['pointer', 'pointer', 'int']],
|
|
103
|
+
_ZN6Method21clear_native_functionEv: ['Method::clear_native_function', 'void', ['pointer']],
|
|
104
|
+
// JDK >= 17
|
|
105
|
+
_ZN6Method24restore_unshareable_infoEP10JavaThread: ['Method::restore_unshareable_info', 'void', ['pointer', 'pointer']],
|
|
106
|
+
// JDK < 17
|
|
107
|
+
_ZN6Method24restore_unshareable_infoEP6Thread: ['Method::restore_unshareable_info', 'void', ['pointer', 'pointer']],
|
|
108
|
+
_ZN6Method10jmethod_idEv: ['Method::jmethod_id', 'pointer', ['pointer']],
|
|
109
|
+
_ZN6Method10clear_codeEv: function (address) {
|
|
110
|
+
const clearCode = new NativeFunction(address, 'void', ['pointer'], nativeFunctionOptions);
|
|
111
|
+
this['Method::clear_code'] = function (thisPtr) {
|
|
112
|
+
clearCode(thisPtr);
|
|
113
|
+
};
|
|
114
|
+
},
|
|
115
|
+
_ZN6Method10clear_codeEb: function (address) {
|
|
116
|
+
const clearCode = new NativeFunction(address, 'void', ['pointer', 'int'], nativeFunctionOptions);
|
|
117
|
+
const lock = 0;
|
|
118
|
+
this['Method::clear_code'] = function (thisPtr) {
|
|
119
|
+
clearCode(thisPtr, lock);
|
|
120
|
+
};
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
// JDK >= 13
|
|
124
|
+
_ZN18VM_RedefineClasses19mark_dependent_codeEP13InstanceKlass: ['VM_RedefineClasses::mark_dependent_code', 'void', ['pointer', 'pointer']],
|
|
125
|
+
_ZN18VM_RedefineClasses20flush_dependent_codeEv: ['VM_RedefineClasses::flush_dependent_code', 'void', []],
|
|
126
|
+
// JDK < 13
|
|
127
|
+
_ZN18VM_RedefineClasses20flush_dependent_codeEP13InstanceKlassP6Thread: ['VM_RedefineClasses::flush_dependent_code', 'void', ['pointer', 'pointer', 'pointer']],
|
|
128
|
+
// JDK < 10
|
|
129
|
+
_ZN18VM_RedefineClasses20flush_dependent_codeE19instanceKlassHandleP6Thread: ['VM_RedefineClasses::flush_dependent_code', 'void', ['pointer', 'pointer', 'pointer']],
|
|
130
|
+
|
|
131
|
+
_ZN19ResolvedMethodTable21adjust_method_entriesEPb: ['ResolvedMethodTable::adjust_method_entries', 'void', ['pointer']],
|
|
132
|
+
// JDK < 10
|
|
133
|
+
_ZN15MemberNameTable21adjust_method_entriesEP13InstanceKlassPb: ['MemberNameTable::adjust_method_entries', 'void', ['pointer', 'pointer', 'pointer']],
|
|
134
|
+
|
|
135
|
+
_ZN17ConstantPoolCache21adjust_method_entriesEPb: function (address) {
|
|
136
|
+
const adjustMethod = new NativeFunction(address, 'void', ['pointer', 'pointer'], nativeFunctionOptions);
|
|
137
|
+
this['ConstantPoolCache::adjust_method_entries'] = function (thisPtr, holderPtr, tracePtr) {
|
|
138
|
+
adjustMethod(thisPtr, tracePtr);
|
|
139
|
+
};
|
|
140
|
+
},
|
|
141
|
+
// JDK < 13
|
|
142
|
+
_ZN17ConstantPoolCache21adjust_method_entriesEP13InstanceKlassPb: function (address) {
|
|
143
|
+
const adjustMethod = new NativeFunction(address, 'void', ['pointer', 'pointer', 'pointer'], nativeFunctionOptions);
|
|
144
|
+
this['ConstantPoolCache::adjust_method_entries'] = function (thisPtr, holderPtr, tracePtr) {
|
|
145
|
+
adjustMethod(thisPtr, holderPtr, tracePtr);
|
|
146
|
+
};
|
|
147
|
+
},
|
|
148
|
+
|
|
149
|
+
_ZN20ClassLoaderDataGraph10classes_doEP12KlassClosure: ['ClassLoaderDataGraph::classes_do', 'void', ['pointer']],
|
|
150
|
+
_ZN20ClassLoaderDataGraph22clean_deallocate_listsEb: ['ClassLoaderDataGraph::clean_deallocate_lists', 'void', ['int']],
|
|
151
|
+
|
|
152
|
+
_ZN10JavaThread27thread_from_jni_environmentEP7JNIEnv_: ['JavaThread::thread_from_jni_environment', 'pointer', ['pointer']],
|
|
153
|
+
|
|
154
|
+
_ZN8VMThread7executeEP12VM_Operation: ['VMThread::execute', 'void', ['pointer']],
|
|
155
|
+
|
|
156
|
+
_ZN11OopMapCache22flush_obsolete_entriesEv: ['OopMapCache::flush_obsolete_entries', 'void', ['pointer']],
|
|
157
|
+
|
|
158
|
+
_ZN14NMethodSweeper11force_sweepEv: ['NMethodSweeper::force_sweep', 'void', []],
|
|
159
|
+
_ZN14NMethodSweeper16sweep_code_cacheEv: ['NMethodSweeper::sweep_code_cache', 'void', []],
|
|
160
|
+
_ZN14NMethodSweeper17sweep_in_progressEv: ['NMethodSweeper::sweep_in_progress', 'bool', []],
|
|
161
|
+
|
|
162
|
+
JVM_Sleep: ['JVM_Sleep', 'void', ['pointer', 'pointer', 'long']]
|
|
163
|
+
},
|
|
164
|
+
variables: {
|
|
165
|
+
// JDK <= 9
|
|
166
|
+
_ZN18VM_RedefineClasses14_the_class_oopE: function (address) {
|
|
167
|
+
this.redefineClass = address;
|
|
168
|
+
},
|
|
169
|
+
// 9 < JDK < 13
|
|
170
|
+
_ZN18VM_RedefineClasses10_the_classE: function (address) {
|
|
171
|
+
this.redefineClass = address;
|
|
172
|
+
},
|
|
173
|
+
// JDK < 13
|
|
174
|
+
_ZN18VM_RedefineClasses25AdjustCpoolCacheAndVtable8do_klassEP5Klass: function (address) {
|
|
175
|
+
this.doKlass = address;
|
|
176
|
+
},
|
|
177
|
+
// JDK >= 13
|
|
178
|
+
_ZN18VM_RedefineClasses22AdjustAndCleanMetadata8do_klassEP5Klass: function (address) {
|
|
179
|
+
this.doKlass = address;
|
|
180
|
+
},
|
|
181
|
+
_ZTV18VM_RedefineClasses: function (address) {
|
|
182
|
+
this.vtableRedefineClasses = address;
|
|
183
|
+
},
|
|
184
|
+
_ZN18VM_RedefineClasses4doitEv: function (address) {
|
|
185
|
+
this.redefineClassesDoIt = address;
|
|
186
|
+
},
|
|
187
|
+
_ZN18VM_RedefineClasses13doit_prologueEv: function (address) {
|
|
188
|
+
this.redefineClassesDoItPrologue = address;
|
|
189
|
+
},
|
|
190
|
+
_ZN18VM_RedefineClasses13doit_epilogueEv: function (address) {
|
|
191
|
+
this.redefineClassesDoItEpilogue = address;
|
|
192
|
+
},
|
|
193
|
+
_ZN18VM_RedefineClassesD0Ev: function (address) {
|
|
194
|
+
this.redefineClassesDispose0 = address;
|
|
195
|
+
},
|
|
196
|
+
_ZN18VM_RedefineClassesD1Ev: function (address) {
|
|
197
|
+
this.redefineClassesDispose1 = address;
|
|
198
|
+
},
|
|
199
|
+
_ZNK18VM_RedefineClasses26allow_nested_vm_operationsEv: function (address) {
|
|
200
|
+
this.redefineClassesAllow = address;
|
|
201
|
+
},
|
|
202
|
+
_ZNK18VM_RedefineClasses14print_on_errorEP12outputStream: function (address) {
|
|
203
|
+
this.redefineClassesOnError = address;
|
|
204
|
+
},
|
|
205
|
+
|
|
206
|
+
// JDK >= 17
|
|
207
|
+
_ZN13InstanceKlass33create_new_default_vtable_indicesEiP10JavaThread: function (address) {
|
|
208
|
+
this.createNewDefaultVtableIndices = address;
|
|
209
|
+
},
|
|
210
|
+
// JDK < 17
|
|
211
|
+
_ZN13InstanceKlass33create_new_default_vtable_indicesEiP6Thread: function (address) {
|
|
212
|
+
this.createNewDefaultVtableIndices = address;
|
|
213
|
+
},
|
|
214
|
+
|
|
215
|
+
_ZN19Abstract_VM_Version19jre_release_versionEv: function (address) {
|
|
216
|
+
const getVersion = new NativeFunction(address, 'pointer', [], nativeFunctionOptions);
|
|
217
|
+
const versionS = getVersion().readCString();
|
|
218
|
+
this.version = versionS.startsWith('1.8')
|
|
219
|
+
? 8
|
|
220
|
+
: versionS.startsWith('9.')
|
|
221
|
+
? 9
|
|
222
|
+
: parseInt(versionS.slice(0, 2), 10);
|
|
223
|
+
this.versionS = versionS;
|
|
224
|
+
},
|
|
225
|
+
|
|
226
|
+
_ZN14NMethodSweeper11_traversalsE: function (address) {
|
|
227
|
+
this.traversals = address;
|
|
228
|
+
},
|
|
229
|
+
_ZN14NMethodSweeper21_sweep_fractions_leftE: function (address) {
|
|
230
|
+
this.fractions = address;
|
|
231
|
+
},
|
|
232
|
+
_ZN14NMethodSweeper13_should_sweepE: function (address) {
|
|
233
|
+
this.shouldSweep = address;
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
optionals: [
|
|
237
|
+
'_ZN6Method24restore_unshareable_infoEP10JavaThread',
|
|
238
|
+
'_ZN6Method24restore_unshareable_infoEP6Thread',
|
|
239
|
+
'_ZN6Method10clear_codeEv',
|
|
240
|
+
'_ZN6Method10clear_codeEb',
|
|
199
241
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
242
|
+
'_ZN18VM_RedefineClasses19mark_dependent_codeEP13InstanceKlass',
|
|
243
|
+
'_ZN18VM_RedefineClasses20flush_dependent_codeEv',
|
|
244
|
+
'_ZN18VM_RedefineClasses20flush_dependent_codeEP13InstanceKlassP6Thread',
|
|
245
|
+
'_ZN18VM_RedefineClasses20flush_dependent_codeE19instanceKlassHandleP6Thread',
|
|
204
246
|
|
|
205
|
-
|
|
206
|
-
|
|
247
|
+
'_ZN19ResolvedMethodTable21adjust_method_entriesEPb',
|
|
248
|
+
'_ZN15MemberNameTable21adjust_method_entriesEP13InstanceKlassPb',
|
|
207
249
|
|
|
208
|
-
|
|
209
|
-
|
|
250
|
+
'_ZN17ConstantPoolCache21adjust_method_entriesEPb',
|
|
251
|
+
'_ZN17ConstantPoolCache21adjust_method_entriesEP13InstanceKlassPb',
|
|
210
252
|
|
|
211
|
-
|
|
253
|
+
'_ZN20ClassLoaderDataGraph22clean_deallocate_listsEb',
|
|
212
254
|
|
|
213
|
-
|
|
255
|
+
'_ZN10JavaThread27thread_from_jni_environmentEP7JNIEnv_',
|
|
214
256
|
|
|
215
|
-
|
|
216
|
-
|
|
257
|
+
'_ZN14NMethodSweeper11force_sweepEv',
|
|
258
|
+
'_ZN14NMethodSweeper17sweep_in_progressEv',
|
|
217
259
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
260
|
+
'_ZN18VM_RedefineClasses14_the_class_oopE',
|
|
261
|
+
'_ZN18VM_RedefineClasses10_the_classE',
|
|
262
|
+
'_ZN18VM_RedefineClasses25AdjustCpoolCacheAndVtable8do_klassEP5Klass',
|
|
263
|
+
'_ZN18VM_RedefineClasses22AdjustAndCleanMetadata8do_klassEP5Klass',
|
|
264
|
+
'_ZN18VM_RedefineClassesD0Ev',
|
|
265
|
+
'_ZN18VM_RedefineClassesD1Ev',
|
|
266
|
+
'_ZNK18VM_RedefineClasses14print_on_errorEP12outputStream',
|
|
225
267
|
|
|
226
|
-
|
|
227
|
-
|
|
268
|
+
'_ZN13InstanceKlass33create_new_default_vtable_indicesEiP10JavaThread',
|
|
269
|
+
'_ZN13InstanceKlass33create_new_default_vtable_indicesEiP6Thread',
|
|
228
270
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
271
|
+
'_ZN14NMethodSweeper21_sweep_fractions_leftE'
|
|
272
|
+
]
|
|
273
|
+
}];
|
|
232
274
|
|
|
233
275
|
const missing = [];
|
|
234
276
|
|
|
@@ -294,10 +336,17 @@ function _getApi () {
|
|
|
294
336
|
}
|
|
295
337
|
temporaryApi.vm = vms.readPointer();
|
|
296
338
|
|
|
297
|
-
const allocatorFunctions =
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
339
|
+
const allocatorFunctions = Process.platform === 'windows'
|
|
340
|
+
? {
|
|
341
|
+
$new: ['??2@YAPEAX_K@Z', 'pointer', ['ulong']],
|
|
342
|
+
$delete: ['??3@YAXPEAX@Z', 'void', ['pointer']]
|
|
343
|
+
}
|
|
344
|
+
// If platform is not Windows
|
|
345
|
+
: {
|
|
346
|
+
$new: ['_Znwm', 'pointer', ['ulong']],
|
|
347
|
+
$delete: ['_ZdlPv', 'void', ['pointer']]
|
|
348
|
+
};
|
|
349
|
+
|
|
301
350
|
for (const [name, [rawName, retType, argTypes]] of Object.entries(allocatorFunctions)) {
|
|
302
351
|
let address = Module.findExportByName(null, rawName);
|
|
303
352
|
if (address === null) {
|