LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 40908 - Segfault in StmtPrinter::VisitIntegerLiteral for __int128 values
Summary: Segfault in StmtPrinter::VisitIntegerLiteral for __int128 values
Status: RESOLVED DUPLICATE of bug 35677
Alias: None
Product: clang
Classification: Unclassified
Component: -New Bugs (show other bugs)
Version: trunk
Hardware: PC All
: P normal
Assignee: Unassigned Clang Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-28 13:32 PST by Arthur O'Dwyer
Modified: 2020-06-26 07:57 PDT (History)
5 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur O'Dwyer 2019-02-28 13:32:15 PST
// 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)
Comment 1 David Stone 2020-06-26 07:57:13 PDT

*** This bug has been marked as a duplicate of bug 35677 ***