[LLVMbugs] [Bug 1088] NEW: getOrInsertFunction is unsafe and broken
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sat Jan 6 22:18:37 PST 2007
http://llvm.org/bugs/show_bug.cgi?id=1088
Summary: getOrInsertFunction is unsafe and broken
Product: tools
Version: 1.0
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: lli
AssignedTo: unassignedbugs at nondot.org
ReportedBy: sabre at nondot.org
Consider this program:
#include <stdio.h>
static void exit(int X) {
printf("myexit called\n");
}
int main() {
exit(1);
}
This should print 'myexit called' once. However:
$ llvm-gcc -c -emit-llvm t.c
$ lli t.o
myexit called
myexit called
ERROR: exit(-1073744072) returned!
Abort
This is due to the failures of the Module::getOrInsertFunction method.
-Chris
------- 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