[llvm-bugs] [Bug 33027] New: [UBSan/Win] "access-violation on unknown address", __asan_unpoison_stack_memory

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 12 08:59:58 PDT 2017


            Bug ID: 33027
           Summary: [UBSan/Win] "access-violation on unknown address",
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mikhail.strelnikov at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

Created attachment 18437
  --> https://bugs.llvm.org/attachment.cgi?id=18437&action=edit
test.bat and test.cpp

class e
    virtual void what() const

int main()
        throw e();
    catch (e const & z)

call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
"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"
"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
    frame #0: 0x00007ff674198f2b exe.exe`__asan_unpoison_stack_memory + 16745
->  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
    #2 0x7ff7aa718c73 in __CxxCallCatchBlock
    #3 0x7ff868059612 in RtlCaptureContext+0x3e2
    #4 0x7ff7aa6c8e0b in main test.cpp:14
    #5 0x7ff7aa714508 in __scrt_common_main_seh
    #6 0x7ff867c42773 in BaseThreadInitThunk+0x13
    #7 0x7ff868020d60 in RtlUserThreadStart+0x20

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: access-violation test.cpp:18 in main

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170512/9598d0fc/attachment.html>

More information about the llvm-bugs mailing list