Open Quuxplusone opened 7 years ago
Attached ubsan-win-exception-crash.zip
(681 bytes, application/x-zip-compressed): test.bat and test.cpp
I've tried to simplify this by compiling and linking in one step, got same
result:
F:\33027>type 33027.cpp
class e
{
public:
virtual void what() const
{
}
};
int main()
{
try
{
throw e{};
}
catch (e const & z)
{
z.what();
}
}
F:\33027>"C:\Program Files\LLVM\bin\clang++.exe" -fuse-ld=lld -O1 -g -
fsanitize=address 33027.cpp -o"exe.exe"
C:\Program Files\LLVM\bin\lld-link: warning: ignoring unknown argument: -
wholearchive:C:\Program Files\LLVM\lib\clang\6.0.0\lib\windows\clang_rt.asan-
x86_64.lib
C:\Program Files\LLVM\bin\lld-link: warning: ignoring unknown argument: -
wholearchive:C:\Program
Files\LLVM\lib\clang\6.0.0\lib\windows\clang_rt.asan_cxx-x86_64.lib
F:\33027>"C:\Program Files\LLVM\bin\lldb.exe" exe.exe -o r -o q
(lldb) target create "exe.exe"
Current executable set to 'exe.exe' (x86_64).
(lldb) r
Process 7360 launching
(lldb) Process 7360 crashed
* thread #1, stop reason = Exception 0xc0000005 encountered at address
0x7ff7adbbe1c4
frame #0: 0x00007ff7adbbe1c4 exe.exe`main at 33027.cpp:17
14 }
15 catch (e const & z)
16 {
-> 17 z.[4mw[0mhat();
18 }
19 }
Process 7360 launched: 'F:\33027\exe.exe' (x86_64)
(lldb) q
ubsan-win-exception-crash.zip
(681 bytes, application/x-zip-compressed)