[PATCH] D28609: [lsan] Enable LSan for x86 Linux.
Yury Gribov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 12 08:30:30 PST 2017
ygribov added inline comments.
================
Comment at: lib/lsan/lsan_interceptors.cc:166
INTERCEPTOR_ATTRIBUTE
-void *operator new(uptr size) { OPERATOR_NEW_BODY; }
+void *operator new(size_t size) { OPERATOR_NEW_BODY; }
INTERCEPTOR_ATTRIBUTE
----------------
m.ostapenko wrote:
> ygribov wrote:
> > Why didn't you like uptrs?
> Because for 32 bit arches uptr doesn't match size_t.
Hm, I thought it's defined to unsigned long on 32-bits...
================
Comment at: test/lsan/TestCases/use_tls_dynamic.cc:18
+
+__attribute__((noinline)) int Test(int argc, char *argv[]) {
std::string path = std::string(argv[0]) + "-so.so";
----------------
m.ostapenko wrote:
> ygribov wrote:
> > Looks like a hack to get test passing...
> Yeah, for x86 the frame for main may contain spilled address for TLS chunk thus leak is not detected. I used the outlining hack to avoid this issue.
> Do you have any suggestion how we can avoid test failure in another way?
I'd use XFAIL. The issue sounds quite important (and not really related to your change).
Repository:
rL LLVM
https://reviews.llvm.org/D28609
More information about the llvm-commits
mailing list