[PATCH] D30818: [lsan] Don't handle DTLS of thread under destruction
Maxim Ostapenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 5 08:33:24 PDT 2017
m.ostapenko added inline comments.
================
Comment at: lib/lsan/lsan_common.cc:208
+ Report("Unable to get registers from thread %d.\n", os_id);
+ // If unable to get SP, consider the entire stack to be reachable unless
+ // GetRegistersAndSP failed with ESRCH.
----------------
eugenis wrote:
> Any idea why is it OK to continue if the registers can not be read, and when can that happen? There is nothing in git history...
As far as I can see in kernel code (http://lxr.free-electrons.com/source/include/linux/regset.h#L58) it seems that possible errno values despite //ESRCH// are //EIO//, //EDEV// and //EFAULT//. For x86_64 the only possible errno value is //EFAULT// (http://lxr.free-electrons.com/source/arch/x86/kernel/ptrace.c#L456). Frankly, I can't tell which of these errors can pop up given the fact that we've already successfully attached to the thread.
Repository:
rL LLVM
https://reviews.llvm.org/D30818
More information about the llvm-commits
mailing list