Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module::getOrInsertFunction is unsafe and broken #1460

Closed
lattner opened this issue Jan 7, 2007 · 1 comment
Closed

Module::getOrInsertFunction is unsafe and broken #1460

lattner opened this issue Jan 7, 2007 · 1 comment
Labels
bugzilla Issues migrated from bugzilla llvm-tools All llvm tools that do not have corresponding tag

Comments

@lattner
Copy link
Collaborator

lattner commented Jan 7, 2007

Bugzilla Link 1088
Resolution FIXED
Resolved on Feb 22, 2010 12:42
Version 1.0
OS All

Extended Description

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

@lattner
Copy link
Collaborator Author

lattner commented Jan 7, 2007

getOrInsertFunction fixed. lli fixed.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
kitano-metro pushed a commit to RIKEN-RCCS/llvm-project that referenced this issue Feb 14, 2023
kitano-metro pushed a commit to RIKEN-RCCS/llvm-project that referenced this issue Feb 14, 2023
kitano-metro pushed a commit to RIKEN-RCCS/llvm-project that referenced this issue Feb 14, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla llvm-tools All llvm tools that do not have corresponding tag
Projects
None yet
Development

No branches or pull requests

1 participant