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

MCJIT is failing when used with more that one module #21225

Closed
deadalnix opened this issue Sep 5, 2014 · 4 comments
Closed

MCJIT is failing when used with more that one module #21225

deadalnix opened this issue Sep 5, 2014 · 4 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla mcjit

Comments

@deadalnix
Copy link
Contributor

Bugzilla Link 20851
Resolution FIXED
Resolved on Sep 05, 2014 18:46
Version trunk
OS All
CC @lhames

Extended Description

Sample code: http://pastebin.com/fL1yTVCk

Compilation: gcc fail.c -m64 /Users/amaury/d/llvm/build/Debug+Asserts/bin/llvm-config --cflags /Users/amaury/d/llvm/build/Debug+Asserts/bin/llvm-config --ldflags /Users/amaury/d/llvm/build/Debug+Asserts/bin/llvm-config --libs -lc++ -lncurses -lz

$ ./a.out
; ModuleID = 'm1'
; ModuleID = 'm2'

define i32 @​foo() {
ret i32 42
}
Bus error: 10

Further exploration showed me that the failure happen when calling the Jitted function. It look like the generated code is invalid.

@deadalnix
Copy link
Contributor Author

assigned to @lhames

@lhames
Copy link
Contributor

lhames commented Sep 5, 2014

Reproduced locally. I'll investigate shortly.

@lhames
Copy link
Contributor

lhames commented Sep 6, 2014

Hi deadalnix,

As discussed on IRC, I think this was due to an iterator invalidation bug in MCJIT. I've fixed that issue in r217291.

Could you check that out and see if it fixes your issue?

Cheers,
Lang.

@deadalnix
Copy link
Contributor Author

It looks good, closing, and thank you !

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 2021
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 mcjit
Projects
None yet
Development

No branches or pull requests

2 participants