[llvm-bugs] [Bug 33902] New: After r303589, Assertion failed: (0 <= N && N < static_cast<int>(m_byteToColumn.size())), function byteToContainingColumn, file tools/clang/lib/Frontend/TextDiagnostic.cpp, line 281.

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jul 23 14:24:10 PDT 2017


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

            Bug ID: 33902
           Summary: After r303589, Assertion failed: (0 <= N && N <
                    static_cast<int>(m_byteToColumn.size())), function
                    byteToContainingColumn, file
                    tools/clang/lib/Frontend/TextDiagnostic.cpp, line 281.
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dimitry at andric.com
                CC: llvm-bugs at lists.llvm.org

I recently imported llvm/clang trunk r308421 into FreeBSD 12-CURRENT, and
afterwards, I got a report [1] that building the graphics/libchamplain port
lead to an assertion failure:

Assertion failed: (0 <= N && N < static_cast<int>(m_byteToColumn.size())),
function byteToContainingColumn, file
/poudriere/jails/head-amd64/usr/src/contrib/llvm/tools/clang/lib/Frontend/TextDiagnostic.cpp,
line 281.

Bisection shows this assertion failure has been introduced by r303589. 
Minimized test case:

#define a(b) #b
#define c(d) _Pragma(a(d))
#define e(f) c(GCC warning #f)
e() e()

Output of clang r303588:

    testcase.c:4:1: warning:  [-W#pragma-messages]
    e() e()
    ^
    testcase.c:3:14: note: expanded from macro 'e'
    #define e(f) c(GCC warning #f)
                 ^
    testcase.c:2:14: note: expanded from macro 'c'
    #define c(d) _Pragma(a(d))
                 ^
    <scratch space>:4:6: note: expanded from here
     GCC warning ""
         ^
    testcase.c:4:5: warning:  [-W#pragma-messages]
    e() e()
        ^
    testcase.c:3:14: note: expanded from macro 'e'
    #define e(f) c(GCC warning #f)
                 ^
    testcase.c:2:14: note: expanded from macro 'c'
    #define c(d) _Pragma(a(d))
                 ^
    <scratch space>:5:6: note: expanded from here
     GCC warning ""
         ^
    2 warnings generated.

Output of clang r303589:

    testcase.c:4:1: warning:  [-W#pragma-messages]
    e() e()
    ^
    testcase.c:3:14: note: expanded from macro 'e'
    #define e(f) c(GCC warning #f)
                 ^
    testcase.c:2:14: note: expanded from macro 'c'
    #define c(d) _Pragma(a(d))
                 ^
    <scratch space>:4:6: note: expanded from here
     GCC warning ""
         ^
    testcase.c:4:5: warning:  [-W#pragma-messages]
    e() e()
        ^
    testcase.c:3:14: note: expanded from macro 'e'
    #define e(f) c(GCC warning #f)
                 ^
    testcase.c:2:14: note: expanded from macro 'c'
    #define c(d) _Pragma(a(d))
                 ^
    <scratch space>:5:6: note: expanded from here
    Assertion failed: (0 <= N && N < static_cast<int>(m_byteToColumn.size())),
function byteToContainingColumn, file
/home/dim/src/llvm-trunk/tools/clang/lib/Frontend/TextDiagnostic.cpp, line 281.

[1]
http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p446433_s321376/logs/errors/libchamplain-0.12.15.log

-- 
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/20170723/343a6769/attachment.html>


More information about the llvm-bugs mailing list