In Tor we're trying to run simulations with a tor binary built with AddressSanitizer; specifically using the --enable-fragile-hardening flag to tor's configure script.
Initially, the asan instrumentation in the tor binary inspects LD_PRELOAD and refuses to run because our LD_PRELOAD'd libraries might interfere with its instrumentation. In particular we get an error in the tor's shimlog -- since the shim's initialization hasn't run yet the write isn't interposed, and STDOUT_FILENO is the shimlog file.
We're able to cirumvent that check by setting ASAN_OPTIONS=verify_asan_link_order=0 in the tor process's environment. google/sanitizers#796 (comment)
After doing that, the tor process runs, but all output goes to the shimlog; it appears that the shim is never getting initialized.
I'm able to reproduce this issue with tor-0.4.7.9 and shadow's tor-minimal test.
More debugging info follows...
In Tor we're trying to run simulations with a tor binary built with AddressSanitizer; specifically using the
--enable-fragile-hardeningflag to tor'sconfigurescript.Initially, the
asaninstrumentation in the tor binary inspectsLD_PRELOADand refuses to run because ourLD_PRELOAD'd libraries might interfere with its instrumentation. In particular we get an error in the tor'sshimlog-- since the shim's initialization hasn't run yet the write isn't interposed, andSTDOUT_FILENOis theshimlogfile.We're able to cirumvent that check by setting
ASAN_OPTIONS=verify_asan_link_order=0in the tor process'senvironment. google/sanitizers#796 (comment)After doing that, the
torprocess runs, but all output goes to theshimlog; it appears that the shim is never getting initialized.I'm able to reproduce this issue with tor-0.4.7.9 and shadow's
tor-minimaltest.More debugging info follows...