[LLVMbugs] [Bug 13833] New: JIT generated code crash on erroneous null instruction

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Sep 13 04:59:56 PDT 2012


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

             Bug #: 13833
           Summary: JIT generated code crash on erroneous null instruction
           Product: new-bugs
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: eran.weiss at emc.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9201
  --> http://llvm.org/bugs/attachment.cgi?id=9201
source code,  generates bug

JIT generates code with wrong instructions (which are 0 bytes).
These crash (Bus error) when evaluated.

IR:
; ModuleID = 'make_func_module'

define i64 @make_function(i32*, i32*, i32*, i32*) {
entry:
  %val = call i64 @void_function()
  ret i64 %val
}

declare i64 @void_function()

ASM:
0x01200030:    push   %eax
0x01200031:    dec    %eax
0x01200032:    mov    $0x10d50,%eax
0x01200037:    add    %al,(%eax)        ## crash
0x01200039:    add    %al,(%eax)
0x0120003b:    call   *%eax
0x0120003d:    pop    %edx
0x0120003e:    ret    

Source attached. Execution:

/usr/bin/g++ `llvm-config --cxxflags` -g -m32 -c bug.c
/usr/bin/g++ `llvm-config --ldflags` -g -m32 -o bug bug.o `llvm-config --libs
all`
./bug

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