[LLVMbugs] [Bug 14290] New: Incorrectly typed ret instruction crashes clang frontend

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Nov 8 02:14:41 PST 2012


             Bug #: 14290
           Summary: Incorrectly typed ret instruction crashes clang
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: dirkjan at ochtman.nl
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This is enough to make clang go down in flames:

target triple = "x86_64-apple-darwin11.0.0"
%str = type { i32, i8* }
define %str* @test(%str* %self) {
    ret %str %self

0  clang             0x0000000101053712 main + 17107202
1  clang             0x0000000101053b99 main + 17108361
2  libsystem_c.dylib 0x00007fff9186d8ea _sigtramp + 26
3  libsystem_c.dylib 0x00007fff6eeb8b58 _sigtramp + 18446744073128948360
4  clang             0x0000000100761a7e main + 7728238
5  clang             0x00000001000efd6a main + 970586
6  clang             0x00000001000efb76 main + 970086
7  clang             0x0000000100045cfb main + 274155
8  clang             0x0000000100044e01 main + 270321
9  clang             0x0000000100019ce2 main + 93906
10 clang             0x0000000100018948 main + 88888
11 clang             0x0000000100006638 main + 14376
12 clang             0x0000000100003097 main + 647
13 clang             0x0000000100002e04
14 clang             0x000000000000002b
Stack dump:
0.    Program arguments: /usr/bin/clang -cc1 -triple x86_64-apple-macosx10.8.0
-emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name
add-q1.ll -pic-level 1 -mdisable-fp-elim -relaxed-aliasing -masm-verbose
-munwind-tables -target-cpu core2 -target-linker-version 133.3 -resource-dir
/usr/bin/../lib/clang/4.0 -fdebug-compilation-dir /Users/djc/src/lang
-ferror-limit 19 -fmessage-length 100 -stack-protector 1 -mstackrealign
-fblocks -fobjc-runtime-has-arc -fobjc-runtime-has-weak
-fobjc-dispatch-method=mixed -fobjc-default-synthesize-properties
-fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/kx/r0q_5lzx0jj0v8rkt8xq1qd40000gn/T/add-q1-hbipHU.o -x ir
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see
clang: note: diagnostic msg: Please submit a bug report to
http://developer.apple.com/bugreporter/ and include command line arguments and
all diagnostic information.
clang: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.

djc at djc-mbp lang $ clang -v
Apple clang version 4.0 (tags/Apple/clang-421.0.57) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix

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