[llvm-bugs] [Bug 24780] New: Segfault in computeBlockInfo

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 10 14:09:50 PDT 2015


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

            Bug ID: 24780
           Summary: Segfault in computeBlockInfo
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: hans at chromium.org
                CC: llvm-bugs at lists.llvm.org, rjmccall at apple.com
    Classification: Unclassified

Created attachment 14866
  --> https://llvm.org/bugs/attachment.cgi?id=14866&action=edit
repro source

clang -cc1 -triple x86_64-apple-macosx10.6.0 -emit-obj -std=c++11 -fblocks
-fno-rtti -fobjc-exceptions -fexceptions -x objective-c++ repro.ii 
#0 0x194e228 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x194e228)
#1 0x194d166 llvm::sys::RunSignalHandlers()
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x194d166)
#2 0x194d391 SignalHandler(int)
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x194d391)
#3 0x7f389bbc6340 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10340)
#4 0x1b5322d (anonymous namespace)::operator<((anonymous
namespace)::BlockLayoutChunk const&, (anonymous namespace)::BlockLayoutChunk
const&) [clone .part.109]
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1b5322d)
#5 0x1b5438b void std::__merge_adaptive<(anonymous
namespace)::BlockLayoutChunk*, long, (anonymous
namespace)::BlockLayoutChunk*>((anonymous namespace)::BlockLayoutChunk*,
(anonymous namespace)::BlockLayoutChunk*, (anonymous
namespace)::BlockLayoutChunk*, long, long, (anonymous
namespace)::BlockLayoutChunk*, long)
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1b5438b)
#6 0x1b54442 void std::__stable_sort_adaptive<(anonymous
namespace)::BlockLayoutChunk*, (anonymous namespace)::BlockLayoutChunk*,
long>((anonymous namespace)::BlockLayoutChunk*, (anonymous
namespace)::BlockLayoutChunk*, (anonymous namespace)::BlockLayoutChunk*, long)
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1b54442)
#7 0x1b5b5c2 computeBlockInfo(clang::CodeGen::CodeGenModule&,
clang::CodeGen::CodeGenFunction*, clang::CodeGen::CGBlockInfo&)
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1b5b5c2)
#8 0x1b5c1f3
clang::CodeGen::CodeGenFunction::enterNonTrivialFullExpression(clang::ExprWithCleanups
const*) (/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1b5c1f3)
#9 0x7a5e37 (anonymous
namespace)::ScalarExprEmitter::VisitExprWithCleanups(clang::ExprWithCleanups*)
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x7a5e37)
#10 0x1bde44f (anonymous namespace)::ScalarExprEmitter::Visit(clang::Expr*)
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1bde44f)
#11 0x1bdf0e3 clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr
const*, bool)
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1bdf0e3)
#12 0x1ba9caf clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*,
clang::CodeGen::AggValueSlot, bool)
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1ba9caf)
#13 0x1bb9f8f clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr
const*) (/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1bb9f8f)
#14 0x1a8f8b3 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*)
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1a8f8b3)
#15 0x1a9049f
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot)
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1a9049f)
#16 0x1aaac0c
clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::CodeGen::FunctionArgList&,
clang::Stmt const*)
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1aaac0c)
#17 0x1ab161d clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&)
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1ab161d)
#18 0x1acda96
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl,
llvm::GlobalValue*)
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1acda96)
#19 0x1add6f0
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*)
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1add6f0)
#20 0x1add8f6 clang::CodeGen::CodeGenModule::EmitDeferred()
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1add8f6)
#21 0x1add914 clang::CodeGen::CodeGenModule::EmitDeferred()
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1add914)
#22 0x1add914 clang::CodeGen::CodeGenModule::EmitDeferred()
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1add914)
#23 0x1add914 clang::CodeGen::CodeGenModule::EmitDeferred()
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1add914)
#24 0x1add914 clang::CodeGen::CodeGenModule::EmitDeferred()
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1add914)
#25 0x1add914 clang::CodeGen::CodeGenModule::EmitDeferred()
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1add914)
#26 0x1adda29 clang::CodeGen::CodeGenModule::Release()
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1adda29)
#27 0x1f8c044 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1f8c044)
#28 0x22465eb clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x22465eb)
#29 0x1f8ce9e clang::CodeGenAction::ExecuteAction()
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1f8ce9e)
#30 0x1cf9db6 clang::FrontendAction::Execute()
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1cf9db6)
#31 0x1cd8ad9 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1cd8ad9)
#32 0x1d7555e clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x1d7555e)
#33 0x959558 cc1_main(llvm::ArrayRef<char const*>, char const*, void*)
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x959558)
#34 0x917983 main
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x917983)
#35 0x7f389add2ec5 __libc_start_main
/build/buildd/eglibc-2.19/csu/libc-start.c:321:0
#36 0x955424 _start
(/usr/local/google/work/llvm/build.release/bin/clang-3.7+0x955424)
Stack dump:
0.      Program arguments: /work/llvm/build.release/bin/clang -cc1 -triple
x86_64-apple-macosx10.6.0 -emit-obj -std=c++11 -fblocks -fno-rtti
-fobjc-exceptions -fexceptions -x objective-c++ repro.ii 
1.      <eof> parser at end of file
2.      Per-file LLVM IR generation
3.      ../../base/mac/call_with_eh_frame_unittest.mm:10:1165: Generating code
for declaration 'base::mac::(anonymous
namespace)::CallWithEHFrameTest_CatchExceptionHigher_Test::TestBody'
Segmentation fault (core dumped)


This seems to have regressed between r246985 and r246990, so I suspect John's
change.

-- 
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/20150910/9c36a6a8/attachment.html>


More information about the llvm-bugs mailing list