[LLVMbugs] [Bug 2666] New: Inliner optimizatin deletes Functions even if there are pointers to them in the stub- >function map

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Aug 11 16:03:45 PDT 2008


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

           Summary: Inliner optimizatin deletes Functions even if there are
                    pointers to them in the stub->function map
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Target-Independent JIT
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nunoplopes at sapo.pt
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=1917)
 --> (http://llvm.org/bugs/attachment.cgi?id=1917)
test case

The inliner optimization deletes internal functions that were inlined. The
problem is that the JIT engine may still have references to such functions, in
particular there might be some code in memory that references such functions
(via stubs).
This bug is easy to trigger. I'll attach a simple test case.

The zip file contains the following:
 - module.c/bc - a module with 2 little functions to be loaded at runtime.
you may need to regenerate the .bc file with e.g. clang. I've compiled it in a
linux/x86 machine
 - jitbug.cpp - the test case itself. comment line 49 (i.e. disable the
inliner) to make the test pass.
 - compile.sh - a one-linner to compile the jitbug.cpp file

to run the test, just type ./test.


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