[LLVMbugs] [Bug 13180] New: Segmentation fault in pass "Simplify the CFG"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jun 22 13:17:51 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13180

             Bug #: 13180
           Summary: Segmentation fault in pass "Simplify the CFG"
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: merkil at savhon.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


This testcase causes LLVM/Clang (as of r158995) to segfault at -O1 and higher :

$ cat file.c
void f(char p)
{
    unsigned i = 0;
    (p ? 1 / i : p) < 1 || p;
}

$ ~/git/clang/build/Release+Asserts/bin/clang -O1 -w file.c
0  clang           0x0000000001be08af
1  clang           0x0000000001be0d74
2  libpthread.so.0 0x000000344d410970
3  clang           0x0000000001966324
llvm::FoldBranchToCommonDest(llvm::BranchInst*) + 5236
4  clang           0x0000000001969d2b
5  clang           0x0000000001968224 llvm::SimplifyCFG(llvm::BasicBlock*,
llvm::TargetData const*) + 20
6  clang           0x00000000018c49b0
7  clang           0x00000000018c3e2e
8  clang           0x0000000001b8709b
llvm::FPPassManager::runOnFunction(llvm::Function&) + 443
9  clang           0x0000000001b872fb
llvm::FPPassManager::runOnModule(llvm::Module&) + 155
10 clang           0x0000000001b87573
llvm::MPPassManager::runOnModule(llvm::Module&) + 419
11 clang           0x0000000001b87af8 llvm::PassManagerImpl::run(llvm::Module&)
+ 408
12 clang           0x0000000001b87c5a llvm::PassManager::run(llvm::Module&) +
10
13 clang           0x000000000078f650
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 5056
14 clang           0x000000000078d49a
15 clang           0x00000000008bb814 clang::ParseAST(clang::Sema&, bool, bool)
+ 516
16 clang           0x000000000078c4f8 clang::CodeGenAction::ExecuteAction() +
184
17 clang           0x000000000066ec65 clang::FrontendAction::Execute() + 101
18 clang           0x0000000000651b5d
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 973
19 clang           0x00000000006398b4
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3316
20 clang           0x000000000062e4eb cc1_main(char const**, char const**, char
const*, void*) + 731
21 clang           0x0000000000635de6 main + 3542
22 libc.so.6       0x000000344d024695 __libc_start_main + 245
23 clang           0x000000000062e12d
Stack dump:
0.    Program arguments: /home/merkil/git/clang/build/Release+Asserts/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
file.c -mrelocation-model static -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-target-linker-version 2.22 -momit-leaf-frame-pointer -resource-dir
/home/merkil/git/clang/build/Release+Asserts/bin/../lib/clang/3.2
-fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem
/usr/local/include -internal-isystem
/home/merkil/git/clang/build/Release+Asserts/bin/../lib/clang/3.2/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O1
-w -fdebug-compilation-dir /home/merkil/garbage/creduce/creduce -ferror-limit
19 -fmessage-length 0 -mstackrealign -fobjc-runtime=gnu-fragile
-fdiagnostics-show-option -o /tmp/file-2MSmbx.o -x c file.c 
1.    <eof> parser at end of file
2.    Per-module optimization passes
3.    Running pass 'Function Pass Manager' on module 'file.c'.
4.    Running pass 'Simplify the CFG' on function '@f'
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.2 (trunk 158995)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list