[PATCH] D93386: [compiler-rt] [Sanitizers] Extend ThreadDescriptorSize() for glibc-2.32-2.fc33.x86_64+i686
Jan Kratochvil via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 16 02:43:22 PST 2020
jankratochvil created this revision.
jankratochvil added reviewers: Lekensteyn, kubamracek, jakubjelinek, vitalybuka.
jankratochvil added a project: LLVM.
Herald added a subscriber: dberris.
jankratochvil requested review of this revision.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
before:
$ echo 'int main(){}'|clang -g -fsanitize=leak -x c++ -;./a.out
Tracer caught signal 11: addr=0x7f4f73da5f40 pc=0x4222c8 sp=0x7f4f72cffd40
==1164171==LeakSanitizer has encountered a fatal error.
==1164171==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==1164171==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
$ _
after:
$ echo 'int main(){}'|clang -g -fsanitize=leak -x c++ -;./a.out)
$ _
Unfortunately I do not have it reproducible on a different box than two my boxes (even not in my VM).
I haven't verified the size cannot be affected by Fedora patches of upstream glibc-2.32 - but I do not expect upstream glibc-2.32 would have the last sizes `(1216, 2304)` from 2013 around glibc-2.12.
There should be some better (at least build-time) verification of the size.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D93386
Files:
compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
Index: compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
===================================================================
--- compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
+++ compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
@@ -294,8 +294,10 @@
val = FIRST_32_SECOND_64(1168, 2288);
else if (minor <= 14)
val = FIRST_32_SECOND_64(1168, 2304);
- else
+ else if (minor < 32) // Unknown version
val = FIRST_32_SECOND_64(1216, 2304);
+ else // minor == 32
+ val = FIRST_32_SECOND_64(1344, 2496);
}
#elif defined(__mips__)
// TODO(sagarthakur): add more values as per different glibc versions.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93386.312164.patch
Type: text/x-patch
Size: 678 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201216/a4a5e78e/attachment.bin>
More information about the llvm-commits
mailing list