[llvm-bugs] [Bug 34346] New: Assertion failure on pragma diagnostic

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 28 07:36:12 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=34346

            Bug ID: 34346
           Summary: Assertion failure on pragma diagnostic
           Product: clang
           Version: 5.0
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: steinar+llvm at gunderson.no
                CC: llvm-bugs at lists.llvm.org

Hi,

The following is a reduced test case from trying to compile RapidJSON (as part
of a MySQL build) on Windows. I'm not sure if the original (unreduced) code was
valid or not, but in any case, the compiler shouldn't assert-fail :-)


$ cat pragma.cc
_Pragma("GCC diagnostic") _Pragma("GCC diagnostic")

R:\ade\mysql\obj>"C:\Program Files\LLVM\msbuild-bin\CL.exe" h:\pragma.cc
h:\pragma.cc(1,1):  warning: pragma diagnostic expected 'error', 'warning',
'ignored', 'fatal', 'push', or 'pop'
      [-Wunknown-pragmas]
_Pragma("GCC diagnostic") _Pragma("GCC diagnostic")
^
<scratch space>(2,16):  note: expanded from here
 GCC diagnostic
               ^
h:\pragma.cc(1,27):  warning: pragma diagnostic expected 'error', 'warning',
'ignored', 'fatal', 'push', or 'pop'
      [-Wunknown-pragmas]
_Pragma("GCC diagnostic") _Pragma("GCC diagnostic")
                          ^
<scratch space>(3,16):  note: expanded from here
Assertion failed: 0 <= N && N < static_cast<int>(m_byteToColumn.size()), file
C:\src\llvm_package_500_rc1\llvm\tools\clang\lib\Frontend\TextDiagnostic.cpp,
line 281
Wrote crash dump file
"C:\Users\sgunders\AppData\Local\Temp\3\cl.exe-bff5f0.dmp"
0x00007FF6555135C6 (0x0000000000000001 0x000000BEE0B8A2A0 0x00007FFC00000001
0x00007FFCE336BF01)
0x00007FFCE33CDB77 (0x0000000000000001 0x00007FF600000000 0x0000000000000000
0x000000BEE0B8A320), raise() + 0x1E7 bytes(s)
0x00007FFCE33CEA01 (0x0002000000000003 0x0000000000000003 0x00007FFCE34247D0
0x00007FF6580DF1C2), abort() + 0x31 bytes(s)
0x00007FFCE33D076A (0x000000BEE0B8A828 0x3E303030302B553C 0x0000000000000003
0x0000000000000119), _get_wpgmptr() + 0x1C9A bytes(s)
0x00007FFCE33D0661 (0x0000000000000119 0x00007FF6580DF1C2 0x00007FFCE33D0980
0x0000000000000000), _get_wpgmptr() + 0x1B91 bytes(s)
0x00007FFCE33D09BF (0x00007FF65728F9D4 0x000000BEE0B8B880 0x000000000000000F
0x0000000000000001), _wassert() + 0x3F bytes(s)
0x00007FF655B46B68 (0x000000BEE0B8BCF8 0x0000000000000000 0x0000DFC9651A5353
0x000000BEE0B8BBA0)
0x00007FF655B49C2C (0x000000BEE0B8B281 0x7C0034E200000011 0x000000BEE0B8B280
0x00007FFC00000042)
0x00007FF655B4AB54 (0x0000000000000000 0x0000000000000000 0x000000BEE0B8BE80
0x000000BEE0B8BEC0)
0x00007FF655B4C416 (0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000)
0x00007FF655B4B509 (0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000)
0x00007FF655B4ABCD (0x0000021FC383BF30 0x000000000000001C 0x000000BEE0B8CB00
0x00007FF6556D0377)
0x00007FF655B21A79 (0x0000DFC9651A5353 0x00007FF6570CDAAC 0x0000021FC3872118
0x000000BEE0B8CD58)
0x00007FF6556C6521 (0x0000DFC9651A5353 0x00007FF6570CDAAC 0x0000021FC380003B
0x00007FF6570BF2F4)
0x00007FF6556C8DD9 (0x0000021FC38720F0 0x00007FF6570BF2DD 0x0000000000002D8B
0x00007FF61D01001C)
0x00007FF65711A624 (0x0000000000000000 0x0000000000000250 0x0000021FC38314C2
0x00007FF657120000)
0x00007FF657114853 (0x0000000000000034 0x0000021F00000010 0x000000BE00000000
0x00007FF600000000)
0x00007FF657114853 (0x0000021FC38CC640 0x00007FF655531136 0x0000000000000003
0x00007FF655B21B60)
0x00007FF6571154BE (0x276465726F6E6769 0x6C61746100000000 0x0000021FC38314BA
0x0000000000000007)
0x00007FF6570FCB96 (0x0000021FC380003B 0x00007FF6570BF2F4 0x0000000000000000
0x0000021FC38314BA)
0x00007FF6570CD32C (0x0000021FC383CE00 0x000000BEE0B8D450 0x0000021FC38C8A00
0x0000000180003DC1)
0x00007FF6570B6BEA (0x0000021FC38C8A00 0x0000000000000001 0x0000021FC38720F0
0x00007FF65711491E)
0x00007FF6570BC2B9 (0x000000010000001A 0x0000021F00000010 0x000000BE00000000
0x0000021F00000000)
0x00007FF6570BAB59 (0x0000000000000001 0x0000021FC3874AEF 0x0000021FC38C8A30
0x000000000000000F)
0x00007FF6570CDA24 (0x0000000D00000001 0x00007FF655531136 0x000000BEE0B8D3DB
0x000000BEE0B8D5D0)
0x00007FF6571154F8 (0x0000021FC383BF30 0x0000021F00000000 0x0000021FC38314A0
0x0000000000000007)
0x00007FF6570FCB96 (0x00000002C3831620 0x0000021FC36F0000 0x000000000000006F
0x0000021FC38314A0)
0x00007FF6570CD32C (0x0000021FC383D238 0x0000021FC383D218 0x0000021FC383D228
0x0000021FC383D250)
0x00007FF6570B6BEA (0x0000000000000009 0x0000000000000000 0x00007FF65816E62E
0x0000000000000009)
0x00007FF6570BC2B9 (0x00007FF65816E60F 0x000000000000000B 0x0000000000000000
0x00007FF65816E604)
0x00007FF6570BAB59 (0x0000021FC388BA30 0x0000000000000000 0x0000021FC38C8A20
0x0000000000000000)
0x00007FF6570CDA24 (0x0000000000000000 0x0000021FC388BA30 0x0000000000000000
0x0000021FC388BA30)
0x00007FF656287015 (0x0000000800000000 0x000000000000000B 0x0000021F00000000
0x0000000000000000)
0x00007FF656283E74 (0x0000000000000000 0x0000000000000000 0x000000000000000F
0x0000021FC382FFE0)
0x00007FF655B6F8DD (0x000000BE00000014 0x00007FF657F67CDD 0x000000000000000E
0x0000021F00000015)
0x00007FF655B33BBF (0x0000021FC3812BB8 0x0000021FC3812BB8 0x00007FF600000001
0x0000000000000038)
0x00007FF655BB9CC8 (0x0000000100000000 0x0000021FC37F0000 0x0000021FC37F0301
0x0000000000000000)
0x00007FF653D36811 (0x0000000000000045 0x0000021FC37F83F6 0x0000021F00000000
0x0000021FC3800B58)
0x00007FF653D34AA9 (0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000)
0x00007FF65728C4E9 (0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000)
0x00007FFCE42E8364 (0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000), BaseThreadInitThunk() + 0x14 bytes(s)
0x00007FFCE66E70D1 (0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000), RtlUserThreadStart() + 0x21 bytes(s)
clang-cl.exe: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 5.0.0 (tags/RELEASE_500/rc1)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM\msbuild-bin
clang-cl.exe: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-cl.exe: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-cl.exe: note: diagnostic msg:
C:\Users\sgunders\AppData\Local\Temp\3\pragma-d41591.cpp
clang-cl.exe: note: diagnostic msg:
C:\Users\sgunders\AppData\Local\Temp\3\pragma-d41591.sh
clang-cl.exe: note: diagnostic msg:

********************

-- 
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/20170828/c124c600/attachment.html>


More information about the llvm-bugs mailing list