<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - [UBSan/Win] "access-violation on unknown address", __asan_unpoison_stack_memory"
href="https://bugs.llvm.org/show_bug.cgi?id=33027">33027</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[UBSan/Win] "access-violation on unknown address", __asan_unpoison_stack_memory
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mikhail.strelnikov@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=18437" name="attach_18437" title="test.bat and test.cpp">attachment 18437</a> <a href="attachment.cgi?id=18437&action=edit" title="test.bat and test.cpp">[details]</a></span>
test.bat and test.cpp
class e
{
public:
virtual void what() const
{
}
};
int main()
{
try
{
throw e();
}
catch (e const & z)
{
z.what();
}
}
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
amd64
"C:\Program Files\LLVM\bin\clang-cl.exe" test.cpp -Fo"exe.obj" /MT /EHsc
-fsanitize=address -fsanitize=undefined /Z7 -c
link /nologo /MACHINE:X64 /MANIFEST /subsystem:console /out:"exe.exe" /DEBUG
"C:\Program Files\LLVM\lib\clang\5.0.0\lib\windows\clang_rt.asan-x86_64.lib"
"exe.obj"
"C:\Program Files\LLVM\bin\lldb.exe" exe.exe -o r -o q
(lldb) Process 6860 crashed
* thread #1, stop reason = Exception 0xc0000005 encountered at address
0x7ff674198f2b
frame #0: 0x00007ff674198f2b exe.exe`__asan_unpoison_stack_memory + 16745
exe.exe`__asan_unpoison_stack_memory:
-> 0x7ff674198f2b <+16745>: movq (%rax), %rcx
0x7ff674198f2e <+16748>: movq %rcx, %rdx
0x7ff674198f31 <+16751>: shrq $0x3, %rdx
0x7ff674198f35 <+16755>: movq 0x78(%rbx), %r8
When started without debugger:
=================================================================
==9380==ERROR: AddressSanitizer: access-violation on unknown address
0x000000000000 (pc 0x7ff7aa6c8f2b bp 0x00a8026ffd80 sp 0x00a8026fd6b0 T0)
==9380==The signal is caused by a READ memory access.
==9380==Hint: address points to the zero page.
#0 0x7ff7aa6c8f2a in main test.cpp:18
#1 0x7ff7aa72390f in _CallSettingFrame
f:\dd\vctools\crt\vcruntime\src\eh\amd64\handlers.asm:49
#2 0x7ff7aa718c73 in __CxxCallCatchBlock
f:\dd\vctools\crt\vcruntime\src\eh\frame.cpp:1322
#3 0x7ff868059612 in RtlCaptureContext+0x3e2
(C:\WINDOWS\SYSTEM32\ntdll.dll+0x1800a9612)
#4 0x7ff7aa6c8e0b in main test.cpp:14
#5 0x7ff7aa714508 in __scrt_common_main_seh
f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253
#6 0x7ff867c42773 in BaseThreadInitThunk+0x13
(C:\WINDOWS\System32\KERNEL32.DLL+0x180012773)
#7 0x7ff868020d60 in RtlUserThreadStart+0x20
(C:\WINDOWS\SYSTEM32\ntdll.dll+0x180070d60)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: access-violation test.cpp:18 in main
==9380==ABORTING</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>