Wasn't sure where I need to file the issue due to c.g.c closure. Now filed: https://code.google.com/p/address-sanitizer/issues/detail?id=404
On Thu, Aug 13, 2015 at 3:03 PM, Ilya Mirsky <ilya.mir...@gmail.com> wrote: > I agree, it would be best. > Is there a ticket I could follow? > > On Wed, Aug 12, 2015 at 4:52 PM, 'Dmitry Vyukov' via thread-sanitizer > <thread-saniti...@googlegroups.com> wrote: >> >> +address-sanitizer >> >> Thanks for the report! >> I guess it is the same for asan as well. >> I think we need to promote usage of relative paths (absolute paths are >> not portable between machines), and then match then as suffix of >> compiled source files. >> >> >> >> >> >> >> On Wed, Aug 12, 2015 at 1:24 PM, Ilya Mirsky <ilya.mir...@gmail.com> >> wrote: >> > Hi, >> > >> > I discovered a weird behaviour with a blacklist file- it doesn't work if >> > the >> > the blacklisted path is absolute and the build string uses relative >> > paths, >> > or vice versa. Is it a bug, a feature, or am I missing something here? >> > The >> > following 4 scenarios demonstrate this behaviour. >> > >> > Clang version: 3.7 >> > OS: Ubuntu 12.04, Linux kernel 3.5.0-36 >> > >> > Thanks, >> > Ilya >> > >> > 1. Relative blacklisting and relative build paths: blacklisting works >> > >> > mirski@mirski-u12:~/src$ cat demos/tsan/blacklist.tsan >> > src:demos/tsan/* >> > >> > mirski@mirski-u12:~/src$ clang -g -fsanitize=thread >> > -fsanitize-blacklist=demos/tsan/blacklist.tsan demos/tsan/race.c >> > mirski@mirski-u12:~/src$ TSAN_OPTIONS= ./a.out >> > Global=42 >> > mirski@mirski-u12:~/src$ >> > >> > 2. Relative blacklisting and absolute build paths: blacklisting doesn't >> > work >> > >> > mirski@mirski-u12:~/src$ cat demos/tsan/blacklist.tsan >> > src:demos/tsan/* >> > >> > mirski@mirski-u12:~/src$ clang -g -fsanitize=thread >> > -fsanitize-blacklist=demos/tsan/blacklist.tsan >> > /home/mirski/src/demos/tsan/race.c >> > mirski@mirski-u12:~/src$ TSAN_OPTIONS= ./a.out >> > ================== >> > WARNING: ThreadSanitizer: data race (pid=31138) >> > Read of size 4 at 0x0000014ad4e0 by main thread: >> > #0 main /home/mirski/src/demos/tsan/race.c:22:27 >> > (a.out+0x0000004a2eb8) >> > >> > Previous write of size 4 at 0x0000014ad4e0 by thread T1: >> > #0 Thread1 /home/mirski/src/demos/tsan/race.c:8:12 >> > (a.out+0x0000004a2e11) >> > >> > Location is global 'Global' of size 4 at 0x0000014ad4e0 >> > (a.out+0x0000014ad4e0) >> > >> > Thread T1 (tid=31140, running) created by main thread at: >> > #0 pthread_create >> > >> > /export/local1/mirski/llvm/release_37/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:849 >> > (a.out+0x000000448c83) >> > #1 main /home/mirski/src/demos/tsan/race.c:16:5 >> > (a.out+0x0000004a2e78) >> > >> > SUMMARY: ThreadSanitizer: data race >> > /home/mirski/src/demos/tsan/race.c:22:27 >> > in main >> > ================== >> > Global=42 >> > ThreadSanitizer: reported 1 warnings >> > >> > 3. Absolute blacklisting and absolute build paths: blacklisting works >> > >> > mirski@mirski-u12:~/src$ cat /home/mirski/src/demos/tsan/blacklist.tsan >> > src:/home/mirski/src/demos/tsan/* >> > >> > mirski@mirski-u12:~/src$ clang -g -fsanitize=thread >> > -fsanitize-blacklist=demos/tsan/blacklist.tsan >> > /home/mirski/src/demos/tsan/race.c >> > mirski@mirski-u12:~/src$ TSAN_OPTIONS= ./a.out >> > Global=42 >> > >> > 4. Absolute blacklisting and relative build paths: blacklisting doesn't >> > work >> > >> > mirski@mirski-u12:~/src$ cat /home/mirski/src/demos/tsan/blacklist.tsan >> > src:/home/mirski/src/demos/tsan/* >> > >> > mirski@mirski-u12:~/src$ clang -g -fsanitize=thread >> > -fsanitize-blacklist=demos/tsan/blacklist.tsan demos/tsan/race.c >> > mirski@mirski-u12:~/src$ TSAN_OPTIONS= ./a.out >> > ================== >> > WARNING: ThreadSanitizer: data race (pid=32632) >> > Read of size 4 at 0x0000014ad4e0 by main thread: >> > #0 main /home/mirski/src/demos/tsan/race.c:22:27 >> > (a.out+0x0000004a2eb8) >> > >> > Previous write of size 4 at 0x0000014ad4e0 by thread T1: >> > #0 Thread1 /home/mirski/src/demos/tsan/race.c:8:12 >> > (a.out+0x0000004a2e11) >> > >> > Location is global 'Global' of size 4 at 0x0000014ad4e0 >> > (a.out+0x0000014ad4e0) >> > >> > Thread T1 (tid=32634, running) created by main thread at: >> > #0 pthread_create >> > >> > /export/local1/mirski/llvm/release_37/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:849 >> > (a.out+0x000000448c83) >> > #1 main /home/mirski/src/demos/tsan/race.c:16:5 >> > (a.out+0x0000004a2e78) >> > >> > SUMMARY: ThreadSanitizer: data race >> > /home/mirski/src/demos/tsan/race.c:22:27 >> > in main >> > ================== >> > Global=42 >> > ThreadSanitizer: reported 1 warnings >> > >> > -- >> > You received this message because you are subscribed to the Google >> > Groups >> > "thread-sanitizer" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> > an >> > email to thread-sanitizer+unsubscr...@googlegroups.com. >> > For more options, visit https://groups.google.com/d/optout. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "thread-sanitizer" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to thread-sanitizer+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google Groups > "thread-sanitizer" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to thread-sanitizer+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "address-sanitizer" group. To unsubscribe from this group and stop receiving emails from it, send an email to address-sanitizer+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.