https://llvm.org/bugs/show_bug.cgi?id=27492
Bug ID: 27492 Summary: llvm-symbolizer on windows report function name incorrectly Product: new-bugs Version: unspecified Hardware: PC OS: Windows XP Status: NEW Severity: normal Priority: P Component: new bugs Assignee: unassignedb...@nondot.org Reporter: vitalyb...@google.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Reproducer is below. I use bash on Windows, so make sure to update paths if needed. >From build directory: 1. cmake -G Ninja ../llvm/ 2. ninja -j 10 clang asan llvm-symbolizer 3. bin/clang.exe -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -gcodeview -fms-compatibility-version=19.00.23918 -std=c++11 -O1 -mllvm -asan-use-after-scope=1 ../llvm/projects/compiler-rt/test/asan/TestCases/use-after-scope-capture.cc -o use-after-scope-capture.cc.exe 4. ./use-after-scope-capture.cc.exe You should see crash with: #0 0x1231f83 in main()::(anonymous class)::operator() d:\src\clang.git\llvm\projects\compiler-rt\test\asan\TestCases \use-after-scope-capture.cc:11 #1 0x1231f1e in std::_Invoker_functor::_Call C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\type_tra its:1398 #2 0x1231eee in std::invoke C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\type_traits:1466 #3 0x1231ece in std::_Invoke_ret C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\type_traits:1491 #4 0x12318ae in std::_Func_impl<`lambda at ../llvm/projects/compiler-rt/test/asan/TestCases/use-after-scope-capture. cc:10:9',std::allocator<int>,int>::_Do_call C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\functional:21 Symbolizer was not used yet. 5. cp bin/llvm-symbolizer.exe . 6. ./use-after-scope-capture.cc.exe Actual result: Now llvm-symbolizer.exe is visible for asan runtime and it outputs: #0 0x221f83 in main d:\src\clang.git\llvm\projects\compiler-rt\test\asan\TestCases\use-after-scope-capture.cc:11:14 #1 0x221f1e in main C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\type_traits:1398:11 #2 0x221eee in main C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\type_traits:1466:10 #3 0x221ece in main C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\type_traits:1491:10 #4 0x2218ae in main C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\functional:212:11 Expected correct result: Stack with more detailed function names, e.g. #0 0x1231f83 in main()::(anonymous class)::operator() Another reproducer: 4. ASAN_OPTIONS=symbolize=0 ./use-after-scope-capture.cc.exe 5. see something like: #0 0x3d1f83 (d:\src\clang.git\build\use-after-scope-capture.cc.exe+0x401f83) 6. copy address after + (here 0x401f83) 7. run bin/llvm-symbolizer.exe 8. type: CODE use-after-scope-capture.cc.exe 0x401f83 Result: CODE main d:\src\clang.git\llvm\projects\compiler-rt\test\asan\TestCases\use-after-scope-capture.cc:11:14 Expected: CODE main()::(anonymous class)::operator() d:\src\clang.git\llvm\projects\compiler-rt\test\asan\TestCases\use-after-scope-capture.cc:11:14 -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs