Diff Detail
Event Timeline
lib/sanitizer_common/sanitizer_symbolizer_linux.cc | ||
---|---|---|
103 | If LD_PRELOAD contains more than one library, you only need to remove yours, not unset LD_PRELOAD completely. |
Why not simply unsetenv("LD_PRELOAD")?
I thought unsetenv acquired a lock, which in fact it doesn't.
lib/sanitizer_common/sanitizer_symbolizer_linux.cc | ||
---|---|---|
103 | How do we know which one is ours? |
lib/sanitizer_common/sanitizer_symbolizer_linux.cc | ||
---|---|---|
103 | You can obtain the library name from dladdr(). |
- removed custom unsetenv implementation
- added a fixme
lib/sanitizer_common/sanitizer_symbolizer_linux.cc | ||
---|---|---|
103 | Adding a FIXME for now, as per our offline discussion. |
lib/sanitizer_common/sanitizer_symbolizer_linux.cc | ||
---|---|---|
107 | Will this work with bash? |
Can we do a "custom" implementation by dlsym("unsetenv") lookup (similar to
current SetEnv implementation)?
- reverted to a custom implementation of unsetenv
Also, modified the implementation to allow multiple entries for the same
variable.
I couldn't find anything related to setenv in bash sources, but I reverted to a custom implementation anyway.
Can we do a "custom" implementation by dlsym("unsetenv") lookup (similar to current SetEnv implementation)?
No. It's not safe to call dlsym after a fork.
If LD_PRELOAD contains more than one library, you only need to remove yours, not unset LD_PRELOAD completely.