[LLVMbugs] [Bug 11327] New: clang crash and subsequent hang

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Nov 7 09:53:12 PST 2011


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

             Bug #: 11327
           Summary: clang crash and subsequent hang
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: regehr at cs.utah.edu
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 7586
  --> http://llvm.org/bugs/attachment.cgi?id=7586
failure inducing input

On x86-64 on Ubuntu 10.04.3, I'm getting Clang trying to die due to some memory
safety error but actually hanging apparently indefinitely, using zero CPU.

So it looks like there are probably two problems here.

[regehr at node2 ~]$ clang -v
clang version 3.1 (trunk 143910)
Target: x86_64-unknown-linux-gnu
Thread model: posix

[regehr at node2 ~]$ clang -O0 small.c
*** glibc detected ***
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang:
free(): invalid pointer: 0x00007fff0cd674cf ***
======= Backtrace: =========
/lib/libc.so.6(+0x775b6)[0x7f45bb83e5b6]
/lib/libc.so.6(cfree+0x73)[0x7f45bb844e83]
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang(_ZN5clang7APValue10MakeUninitEv+0xbc)[0xf137ec]
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang[0xfa0b45]
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang(_ZNK5clang4Expr16EvaluateAsRValueERNS0_10EvalResultERKNS_10ASTContextE+0x215)[0xf9f845]
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang(_ZNK5clang4Expr13isEvaluatableERKNS_10ASTContextE+0x2f)[0xfa13cf]
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang(_ZNK5clang4Expr21isConstantInitializerERNS_10ASTContextEb+0x3a7)[0xf96067]
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang(_ZN5clang4Sema27CheckForConstantInitializerEPNS_4ExprENS_8QualTypeE+0x1b)[0xa2e8cb]
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang(_ZN5clang4Sema20AddInitializerToDeclEPNS_4DeclEPNS_4ExprEbb+0x174b)[0xa3020b]
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang(_ZN5clang6Parser44ParseDeclarationAfterDeclaratorAndAttributesERNS_10DeclaratorERKNS0_18ParsedTemplateInfoE+0x93d)[0x95922d]
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang(_ZN5clang6Parser14ParseDeclGroupERNS0_15ParsingDeclSpecEjbPNS_14SourceLocationEPNS0_12ForRangeInitE+0x6d5)[0x957dc5]
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang(_ZN5clang6Parser36ParseDeclarationOrFunctionDefinitionERNS0_15ParsingDeclSpecENS_15AccessSpecifierE+0x35f)[0x9490ef]
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang(_ZN5clang6Parser36ParseDeclarationOrFunctionDefinitionERNS_16ParsedAttributesENS_15AccessSpecifierE+0x189)[0x9492e9]
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang(_ZN5clang6Parser24ParseExternalDeclarationERNS0_25ParsedAttributesWithRangeEPNS0_15ParsingDeclSpecE+0xdac)[0x9482cc]
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang(_ZN5clang6Parser17ParseTopLevelDeclERNS_9OpaquePtrINS_12DeclGroupRefEEE+0x100)[0x9474f0]
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang(_ZN5clang8ParseASTERNS_4SemaEb+0x13e)[0x9288fe]
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang(_ZN5clang13CodeGenAction13ExecuteActionEv+0x347)[0x803527]
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x3d7)[0x6cf597]
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang(_ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE+0xb1e)[0x6b738e]
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang(_Z8cc1_mainPPKcS1_S0_Pv+0x1651)[0x6adf71]
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang(main+0x312)[0x6b3462]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7f45bb7e5c4d]
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang[0x6ac859]
======= Memory map: ========
00400000-020a9000 r-xp 00000000 08:04 2100181                           
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang
022a8000-022ec000 r--p 01ca8000 08:04 2100181                           
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang
022ec000-0242f000 rw-p 01cec000 08:04 2100181                           
/mnt/local/randomtest/compiler-install/llvm-gcc-r143910-install/bin/clang
0242f000-0243d000 rw-p 00000000 00:00 0 
02f2e000-03015000 rw-p 00000000 00:00 0                                  [heap]
7f45b4000000-7f45b4021000 rw-p 00000000 00:00 0 
7f45b4021000-7f45b8000000 ---p 00000000 00:00 0 
7f45bb7c7000-7f45bb941000 r-xp 00000000 08:02 34255                     
/lib/libc-2.11.1.so
7f45bb941000-7f45bbb40000 ---p 0017a000 08:02 34255                     
/lib/libc-2.11.1.so
7f45bbb40000-7f45bbb44000 r--p 00179000 08:02 34255                     
/lib/libc-2.11.1.so
7f45bbb44000-7f45bbb45000 rw-p 0017d000 08:02 34255                     
/lib/libc-2.11.1.so
7f45bbb45000-7f45bbb4a000 rw-p 00000000 00:00 0 
7f45bbb4a000-7f45bbb60000 r-xp 00000000 08:02 32839                     
/lib/libgcc_s.so.1
7f45bbb60000-7f45bbd5f000 ---p 00016000 08:02 32839                     
/lib/libgcc_s.so.1
7f45bbd5f000-7f45bbd60000 r--p 00015000 08:02 32839                     
/lib/libgcc_s.so.1
7f45bbd60000-7f45bbd61000 rw-p 00016000 08:02 32839                     
/lib/libgcc_s.so.1
7f45bbd61000-7f45bbe57000 r-xp 00000000 08:02 91705                     
/usr/lib/libstdc++.so.6.0.13
7f45bbe57000-7f45bc057000 ---p 000f6000 08:02 91705                     
/usr/lib/libstdc++.so.6.0.13
7f45bc057000-7f45bc05e000 r--p 000f6000 08:02 91705                     
/usr/lib/libstdc++.so.6.0.13
7f45bc05e000-7f45bc060000 rw-p 000fd000 08:02 91705                     
/usr/lib/libstdc++.so.6.0.13
7f45bc060000-7f45bc075000 rw-p 00000000 00:00 0 
7f45bc075000-7f45bc0f7000 r-xp 00000000 08:02 34259                     
/lib/libm-2.11.1.so
7f45bc0f7000-7f45bc2f6000 ---p 00082000 08:02 34259                     
/lib/libm-2.11.1.so
7f45bc2f6000-7f45bc2f7000 r--p 00081000 08:02 34259                     
/lib/libm-2.11.1.so
7f45bc2f7000-7f45bc2f8000 rw-p 00082000 08:02 34259                     
/lib/libm-2.11.1.so
7f45bc2f8000-7f45bc2fa000 r-xp 00000000 08:02 34258                     
/lib/libdl-2.11.1.so
7f45bc2fa000-7f45bc4fa000 ---p 00002000 08:02 34258                     
/lib/libdl-2.11.1.so
7f45bc4fa000-7f45bc4fb000 r--p 00002000 08:02 34258                     
/lib/libdl-2.11.1.so
7f45bc4fb000-7f45bc4fc000 rw-p 00003000 08:02 34258                     
/lib/libdl-2.11.1.so
7f45bc4fc000-7f45bc514000 r-xp 00000000 08:02 34269                     
/lib/libpthread-2.11.1.so

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