Since glibc 2.34, dlsym does
- malloc 1
- malloc 2
- free pointer from malloc 1
- free pointer from malloc 2
These sequence was not handled by trivial dlsym hack.
This fixes https://bugs.llvm.org/show_bug.cgi?id=52278
Differential D112588
[sanitizer] Switch dlsym hack to internal_allocator vitalybuka on Oct 26 2021, 6:03 PM. Authored by
Details Since glibc 2.34, dlsym does
These sequence was not handled by trivial dlsym hack. This fixes https://bugs.llvm.org/show_bug.cgi?id=52278
Diff Detail Event Timeline
|
This one is annoying. To keep behavioral closer to original I use root regions.
What I see is that "dlsym hack" allocations contains pointers to later regular dlerror allocations.
it would be nice to investigate if dlerror is special. If so we can remove regions in followup patches
and add dlerror interceptors to lsan and asan.