Skip to content

Commit

Permalink
android: Fix hooking art_quick_resolution_trampoline (#307)
Browse files Browse the repository at this point in the history
When using --enable-optimizations on newer ARTs, the quick entrypoint=
can be art_quick_resolution_trampoline.

Fixes #306.
  • Loading branch information
cr4zyserb authored Feb 13, 2024
1 parent aae6012 commit 0aea1c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/android.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ function _getApi () {

temporaryApi.artQuickGenericJniTrampoline = getArtQuickEntrypointFromTrampoline(quickGenericJniTrampoline, vm);
temporaryApi.artQuickToInterpreterBridge = getArtQuickEntrypointFromTrampoline(quickToInterpreterBridgeTrampoline, vm);
temporaryApi.artQuickResolutionTrampoline = getArtQuickEntrypointFromTrampoline(quickResolutionTrampoline, vm);

if (temporaryApi['art::JavaVMExt::AddGlobalRef'] === undefined) {
temporaryApi['art::JavaVMExt::AddGlobalRef'] = makeAddGlobalRefFallbackForAndroid5(temporaryApi);
Expand Down Expand Up @@ -1825,7 +1826,8 @@ function instrumentArtQuickEntrypoints (vm) {
// Entrypoints that dispatch method invocation from the quick ABI.
const quickEntrypoints = [
api.artQuickGenericJniTrampoline,
api.artQuickToInterpreterBridge
api.artQuickToInterpreterBridge,
api.artQuickResolutionTrampoline
];

quickEntrypoints.forEach(entrypoint => {
Expand Down

0 comments on commit 0aea1c6

Please sign in to comment.