Skip to content

fix(helper): coexist on dyld inserts, re-arm sims#78

Merged
0xnirapod merged 1 commit into
mainfrom
fix/auto-injection-robustness
Jun 29, 2026
Merged

fix(helper): coexist on dyld inserts, re-arm sims#78
0xnirapod merged 1 commit into
mainfrom
fix/auto-injection-robustness

Conversation

@athexweb3

Copy link
Copy Markdown
Contributor

SimEnclave and a peer simulator-injection tool (e.g. SimBLE) both set DYLD_INSERT_LIBRARIES; a single launchctl setenv overwrote the other, and arming ran only at helper start.

  • Compose DYLD_INSERT_LIBRARIES append-if-absent and remove only our own entry on teardown, so injection tools coexist (new InjectionEnv utility plus unit tests).
  • Re-arm booted simulators on a short cadence, so a sim booted after the helper, a reboot, or a clobber recovers without a manual toggle.
  • Install hooks only when both port and token are present, and set them before the insert var, so a half-set environment injects nothing.

Fence allowlist updated for the new file; fence-check and the full test gate pass locally.

A single launchctl setenv overwrote any DYLD_INSERT_LIBRARIES a peer tool
(e.g. SimBLE) had set, and arming ran only at helper start. Compose
append-if-absent, remove only our own entry on teardown, and re-arm booted
sims on a short cadence, so peers coexist and a boot, reboot, or clobber
recovers without a manual toggle. The interposer now installs only when
both port and token are set, and those are set before the insert var.
@athexweb3
athexweb3 requested a review from 0xnirapod as a code owner June 29, 2026 14:16
@0xnirapod
0xnirapod merged commit f1b3003 into main Jun 29, 2026
6 checks passed
@0xnirapod
0xnirapod deleted the fix/auto-injection-robustness branch June 29, 2026 14:19
@athexweb3 athexweb3 mentioned this pull request Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants