You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
handle_trace's standalone branch declared `auto pid = fork()`, shadowing the
tracee PID it had just parsed, and reported a failed fork with `return false`
-- which is 0, i.e. EXIT_SUCCESS -- from a function returning int. The child
also left its failure paths on `return`, so instead of exiting it unwound back
into main; had monitor.run() ever returned, it would have fallen through and
attached to zygote a second time. Name the fork result, return EXIT_FAILURE,
and terminate the child with _exit() on every path. The child additionally
inherited handle_interrupt with g_traced_pid already armed, so a stray SIGTERM
made it detach a process it never attached to; clear it after the fork.
Scripts: quote the pidof substitutions -- an empty result silently shifted argv
and fed `trace --standalone` a missing pid -- pick the tracer binary once
instead of hardcoding zygisk-ptrace64 in service.sh, and bail with a log line
when no zygote or no tracer is found. The 32-bit branch looked for "zygote32",
but app_process only ever names itself "zygote64" or "zygote".
Dead code: drop the commented-out copy_to_temp call site along with the use_temp
plumbing that could never fire, and the commented-out libart lookup in
JniAttachment that RTLD_DEFAULT already covers. Keep copy_to_temp itself, marked
maybe_unused, documented as a debugging aid. Restore the DeleteLocalRef on the
gids array. Also fix the --spwan usage typo, `sucess`, "No moniter handler
actived", a missing newline, and replace the local PROP_VALUE_MAX define with
the bionic header that defines it.
0 commit comments