Open GoogleCodeExporter opened 9 years ago
Even slightly simpler, to get rid of c++ism:
#include <pthread.h>
#include <stdlib.h>
int main(int argc, char** argv)
{
pthread_key_t key;
pthread_key_create(&key, &free);;
pthread_setspecific(key, malloc(1));
return 0;
}
Original comment by t...@cloudera.com
on 19 Mar 2015 at 11:38
Fun. When both lsan and gdb play dirty tricks with TSD, gdb wins. :)
I don't think we will treat this as high priority, but thanks for the report
anyway.
Original comment by konstant...@gmail.com
on 19 Mar 2015 at 11:45
Running LSan under GDB is not supported. This report happens because LSan fails
to attach to the main thread (as GDB is already attached to it) and
subsequently ignores any thread-local data coming from that thread.
I wonder if we should just crash whenever there's at least one thread we can't
attach to.
Original comment by earth...@chromium.org
on 23 Mar 2015 at 1:25
In preference to crashing, I'd rather just having a report at program
termination that says "Leak detection skipped: unable to attach to thread <X>
(perhaps running under GDB?)" or something like that. Or, still report the
leaks, and note that there may be false positives due to failure to attach to
some thread(s)? I regularly run ASAN builds in gdb, and it would be annoying to
have to always remember to set ASAN_OPTIONS=detect_leaks=0 before doing so.
Original comment by t...@cloudera.com
on 23 Mar 2015 at 5:27
Adding Project:AddressSanitizer as part of GitHub migration.
Original comment by ramosian.glider@gmail.com
on 30 Jul 2015 at 9:06
Original issue reported on code.google.com by
t...@cloudera.com
on 19 Mar 2015 at 11:35