[LLVMbugs] [Bug 8473] New: Crash with vla and indirect jump

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Oct 26 22:56:40 PDT 2010


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

           Summary: Crash with vla and indirect jump
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: abramobagnara at tin.it
                CC: llvmbugs at cs.uiuc.edu


$ cat s.c

void f(int n) {
  goto *&&a;
  {
    int x[n];
  a:
    x[0];
  }
}

$ clang -w -S s.c
Instruction does not dominate all uses!
  %tmp1 = bitcast i8* %vla to i32*
  %arrayidx = getelementptr inbounds i32* %tmp1, i32 0
Instruction does not dominate all uses!
  %arrayidx = getelementptr inbounds i32* %tmp1, i32 0
  %tmp2 = load i32* %arrayidx
Broken module found, compilation aborted!
0  clang     0x0997a6cf
1  clang     0x0997a45c
2            0x00a93400 __kernel_sigreturn + 0
3  libc.so.6 0x0013da82 abort + 386
4  clang     0x098cf019
5  clang     0x098ced0e
6  clang     0x098a545d llvm::FPPassManager::runOnFunction(llvm::Function&) +
313
7  clang     0x098a5190 llvm::FunctionPassManagerImpl::run(llvm::Function&) +
90
8  clang     0x098a4e32 llvm::FunctionPassManager::run(llvm::Function&) + 176
9  clang     0x08b424e5
10 clang     0x08b42623 clang::EmitBackendOutput(clang::Diagnostic&,
clang::CodeGenOptions const&, clang::TargetOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 70
11 clang     0x08b3e889
12 clang     0x08c955cb clang::ParseAST(clang::Sema&, bool) + 599
13 clang     0x08a23b12 clang::ASTFrontendAction::ExecuteAction() + 254
14 clang     0x08b3f69d clang::CodeGenAction::ExecuteAction() + 913
15 clang     0x08a23766 clang::FrontendAction::Execute() + 316
16 clang     0x08a0f21c
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 780
17 clang     0x089c3942
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 787
18 clang     0x089b76df cc1_main(char const**, char const**, char const*,
void*) + 976
19 clang     0x089bfaa9 main + 521
20 libc.so.6 0x00126bd6 __libc_start_main + 230
21 clang     0x089b6de1
Stack dump:
0.    Program arguments: /home/abramo/llvm/Debug+Asserts/bin/clang -cc1 -triple
i386-pc-linux-gnu -S -disable-free -main-file-name s.c -mrelocation-model
static -mdisable-fp-elim -mconstructor-aliases -target-cpu pentium4
-target-linker-version 2.20.1 -resource-dir
/home/abramo/llvm/Debug+Asserts/lib/clang/2.9 -ferror-limit 19 -fmessage-length
80 -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o s.s -x c s.c 
1.    <eof> parser at end of file
2.    Per-function optimization
3.    Running pass 'Module Verifier' on function '@f'
clang: error: clang frontend command failed due to signal 6 (use -v to see
invocation)

-- 
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