Jim Newsome
Jim Newsome
Another bit of complexity here is that there are a fair number of places where we assume that the native working directory is the same as the virtualized working directory....
I'm unable to attach gdb to the tor process using shadow's `--debug-hosts` flag; when I try to attach the process has already exited. IIUC since the shim's initialization code never...
This time I tried setting a breakpoint on `_shim_load` (the shim's global constructor) before following the fork. It looks like it is getting run: ``` (gdb) bt #0 0x00007ffff6702e78 in...
> I think you'll also need to disable shadow's libc preload. https://github.com/shadow/shadow/discussions/2346 Ah thanks - I thought I remembered there being an issue for this already but couldn't find it....
Yes, with `--use-preload-libc=false`, `_shim_load` gets called first when it runs as a global constructor, instead of getting called by a syscall wrapper in the libc preload, and ends up working...
I tried changing `_shim_load` to keep looking for `SHADOW_SPAWNED` every time it runs until it finds it, so that we do initialize later. In that case we run into another...
Actually we run into the same problem with the libc preload disabled. I suspect we may have gotten further in https://github.com/shadow/shadow/discussions/2346 before 9cee888d4ffcdd74e72310a0b93f4600fe1f0cb7 changed the shim to make more use...
> I suspect we may have gotten further in https://github.com/shadow/shadow/discussions/2346 before https://github.com/shadow/shadow/commit/9cee888d4ffcdd74e72310a0b93f4600fe1f0cb7 changed the shim to make more use of "native" thread local storage, which is what asan is intercepting....
Removing the shim's dependencies on libc (including native thread local storage) should mostly solve this https://github.com/shadow/shadow/issues/2919
I got tor with `--enable-fragile-hardening` working in our `tor-minimal` test locally. Here's a draft PR with my changes: https://github.com/shadow/shadow/pull/3022 Specifically this was with `tor` at 34da50718a4395936736c32e8cc24876d2f7e10c, configured with `./configure --enable-fragile-hardening...