[LLVMbugs] [Bug 9845] New: clang crash with floating point exception

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed May 4 18:59:34 PDT 2011


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

           Summary: clang crash with floating point exception
           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: regehr at cs.utah.edu
                CC: llvmbugs at cs.uiuc.edu, chenyang at cs.utah.edu


[regehr at gamow tmp018]$ clang -c -w -O2 small.c
0  clang           0x00000000018e1acf
1  clang           0x00000000018e3d42
2  libpthread.so.0 0x00007ffff7bcf8f0
3  clang           0x00000000015dc881
4  clang           0x00000000015dde14
5  clang           0x00000000015de867
6  clang           0x00000000017042d4
llvm::LPPassManager::runOnFunction(llvm::Function&) + 1252
7  clang           0x000000000182e2cb
llvm::FPPassManager::runOnFunction(llvm::Function&) + 587
8  clang           0x000000000182e3cb
llvm::FPPassManager::runOnModule(llvm::Module&) + 75
9  clang           0x000000000182ddc7
llvm::MPPassManager::runOnModule(llvm::Module&) + 503
10 clang           0x000000000182df5b llvm::PassManagerImpl::run(llvm::Module&)
+ 187
11 clang           0x00000000007c7dde
12 clang           0x00000000007c8a0d
clang::EmitBackendOutput(clang::Diagnostic&, clang::CodeGenOptions const&,
clang::TargetOptions const&, llvm::Module*, clang::BackendAction,
llvm::raw_ostream*) + 189
13 clang           0x00000000007c53fb
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 251
14 clang           0x00000000008f525d clang::ParseAST(clang::Sema&, bool) + 413
15 clang           0x00000000007c4744 clang::CodeGenAction::ExecuteAction() +
68
16 clang           0x00000000006b09f3
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 371
17 clang           0x0000000000688124
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1268
18 clang           0x000000000067efdb cc1_main(char const**, char const**, char
const*, void*) + 683
19 clang           0x0000000000686f77 main + 6295
20 libc.so.6       0x00007ffff6ea9c4d __libc_start_main + 253
21 clang           0x000000000067d4a9
Stack dump:
0.    Program arguments:
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r130907-install/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
small.c -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.20.1 -momit-leaf-frame-pointer -coverage-file small.o -resource-dir
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r130907-install/bin/../lib/clang/3.0
-O2 -w -ferror-limit 19 -fmessage-length 81 -fgnu-runtime
-fdiagnostics-show-option -fcolor-diagnostics -o small.o -x c small.c 
1.    <eof> parser at end of file
2.    Code generation
3.    Running pass 'Function Pass Manager' on module 'small.c'.
4.    Running pass 'Loop Pass Manager' on function '@func_37'
5.    Running pass 'Loop Strength Reduction' on basic block '%for.body'
clang: error: unable to execute command: Floating point exception
clang: error: clang frontend command failed due to signal 1 (use -v to see
invocation)

[regehr at gamow tmp018]$ clang -v

clang version 3.0 (trunk 130907)
Target: x86_64-unknown-linux-gnu
Thread model: posix

[regehr at gamow tmp018]$ cat small.c


long
safe_33 (int si1, long si2)
{
  return 0 ? 0 : si1 - si2;
}

int
safe_36 (long si1, int si2)
{
  return si1 == -9223372036854775807LL - 1;
}

int
safe_62 (int ui1, int ui2)
{
  return ui1 + 1;
}

int g_43;
int **
func_37 (p_38)
{
  for (0; 1; p_38 = safe_62 (p_38, 1))
    {
      int *l_42 = &g_43;
      if (safe_36 (safe_33 (p_38, *l_42), 0))
    {
    }
      else
    for (0; g_43; 1)
      {
      }
    }
}

int
main (void)
{
  return 0;
}

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