[llvm-bugs] [Bug 40908] New: Segfault in StmtPrinter::VisitIntegerLiteral for __int128 values

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Feb 28 13:32:15 PST 2019


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

            Bug ID: 40908
           Summary: Segfault in StmtPrinter::VisitIntegerLiteral for
                    __int128 values
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: arthur.j.odwyer at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

// https://godbolt.org/z/qFl8Dd
template<__int128 C>
void f() {
    static_assert(C == 42);
}

void g() {
    f<1>();
}


Partial stack trace:
 #3 0x00007f2b12b96890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #4 0x000055fbc7832253 llvm::raw_ostream::write(unsigned char)
(/opt/compiler-explorer/clang-trunk-20190228/bin/clang-9+0x252b253)
 #5 0x000055fbc960b3ba (anonymous
namespace)::StmtPrinter::VisitIntegerLiteral(clang::IntegerLiteral*)
(/opt/compiler-explorer/clang-trunk-20190228/bin/clang-9+0x43043ba)
 #6 0x000055fbc960c68d (anonymous namespace)::StmtPrinter::Visit(clang::Stmt*)
(/opt/compiler-explorer/clang-trunk-20190228/bin/clang-9+0x430568d)
 #7 0x000055fbc960cdaa (anonymous namespace)::StmtPrinter::Visit(clang::Stmt*)
(/opt/compiler-explorer/clang-trunk-20190228/bin/clang-9+0x4305daa)
 #8 0x000055fbc9612708 (anonymous
namespace)::StmtPrinter::VisitBinaryOperator(clang::BinaryOperator*)
(/opt/compiler-explorer/clang-trunk-20190228/bin/clang-9+0x430b708)
 #9 0x000055fbc960bce3 (anonymous namespace)::StmtPrinter::Visit(clang::Stmt*)
(/opt/compiler-explorer/clang-trunk-20190228/bin/clang-9+0x4304ce3)
#10 0x000055fbc960df82 clang::Stmt::printPretty(llvm::raw_ostream&,
clang::PrinterHelper*, clang::PrintingPolicy const&, unsigned int,
llvm::StringRef, clang::ASTContext const*) const
(/opt/compiler-explorer/clang-trunk-20190228/bin/clang-9+0x4306f82)
#11 0x000055fbc91b32f7
clang::Sema::findFailedBooleanCondition[abi:cxx11](clang::Expr*)
(/opt/compiler-explorer/clang-trunk-20190228/bin/clang-9+0x3eac2f7)
#12 0x000055fbc8ed05c2
clang::Sema::BuildStaticAssertDeclaration(clang::SourceLocation, clang::Expr*,
clang::StringLiteral*, clang::SourceLocation, bool)

-- 
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/20190228/6a4af910/attachment-0001.html>


More information about the llvm-bugs mailing list