Lach
Lach
As I can see, old llvm version was initialized before shmoverride too, but it wasn't calling fstat before. Now it is calling fstat, and because it is initializing before shmoverride...
That's strange, I have tested this change on QubesOS with no problems, it should not affect library loading at all, it only affects initialization. Except if there was some build...
Yep, also a possibility, I'll research.
For some reason, it is not working when built using QubesOS build system, and I have no idea why. For now, I have implemented safer version of this patch with...
Huh, both current and previous version of this patch works fine on NixOS with Xwayland
> did unsetenv("LD_PRELOAD") not work? Maybe it did, but some other initializer spawned processes before try_init was called? Have you kept the constructor function? It is being called on NixOS,...
Have you used only one patch (try_init), or both at the same time (try_init + initfirst)? try_init doesn't require initfirst to be set
How about using patchelf to reroute calls to fstat/mmap from wanted library to shmoverride.so directly? (Just --add-needed shmoverride.so, --rename-dynamic-symbols fstat -> shmoverride_fstat, etc) I'm not sure how well that may...
> In fact, it looks like the compiler is smart enough to inline the if (init_called) part. I was checking on godbolt, and __builtin_expect makes this optimization always work, without...
@uniquenetworkbot fast-forward develop