Open GoogleCodeExporter opened 8 years ago
Here's a reasonably small self-contained repro. You can probably minimize it
even more.
$ clang++ SkBlitRow_opts_SSE2.cpp -fsanitize=memory -gline-tables-only -O0
$ ./a.out
==8498== WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x7f830334c153 in S32A_Opaque_BlitRow32_SSE2(unsigned int*, unsigned int const*, int, unsigned int) ./SkBlitRow_opts_SSE2.cpp:31:30
...
$ clang++ SkBlitRow_opts_SSE2.cpp -fsanitize=memory -gline-tables-only -O1
$ ./a.out
==8504== WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x7ff1b4df6908 in S32A_Opaque_BlitRow32_SSE2(unsigned int*, unsigned int const*, int, unsigned int) ./SkBlitRow_opts_SSE2.cpp:14
...
Original comment by earth...@google.com
on 21 Feb 2014 at 3:58
Attachments:
Debug info is missing from SSE intrinsics, even before MemorySanitizerPass,
even at -O0.
At -O0 the code is not moved as much, and the call to __msan_report_error gets
assigned the line number of the nearby code, which works OK. At -O3 we get a
wildly incorrect line number.
The problem is easy to see on the small sample code from this other bug
(compile to .ll and note missing !dbg annotations):
https://code.google.com/p/memory-sanitizer/issues/detail?id=48
Original comment by euge...@google.com
on 27 Feb 2014 at 2:12
http://llvm.org/bugs/show_bug.cgi?id=19001
Original comment by euge...@google.com
on 28 Feb 2014 at 8:10
Adding Project:MemorySanitizer as part of GitHub migration.
Original comment by gli...@google.com
on 30 Jul 2015 at 9:22
Original issue reported on code.google.com by
euge...@google.com
on 20 Feb 2014 at 10:42