[LLVMbugs] [Bug 1486] NEW: ExitValue of intepreter left in broken state at interpreter construction

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Jun 1 12:00:37 PDT 2007


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

           Summary: ExitValue of intepreter left in broken state at
                    interpreter construction
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Interpreter
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: cfr at adobe.com


Interpreter::Interpreter(Module *M) : ExecutionEngine(M), TD(M) {
	  memset(&ExitValue, 0, sizeof(ExitValue));   <-----
	...
	}

The problem with this line is that it leaves the APInt value within 
ExitValue in a broken state (bit width cannot be zero).  If you run a 
function with no return value through the interpreter it will crash as 
the ExitValue is passed out of the interpreter's run function as it 
gets to the APInt copy constructor.

This problem is easily reproducable with by running a void function through 
the interpeter.  I've seen this repro both on Mac OSX and Vista.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list