Remove hotswapping support from cranelift-jit#10345
Merged
alexcrichton merged 2 commits intobytecodealliance:mainfrom Mar 6, 2025
Merged
Remove hotswapping support from cranelift-jit#10345alexcrichton merged 2 commits intobytecodealliance:mainfrom
alexcrichton merged 2 commits intobytecodealliance:mainfrom
Conversation
It was originally introduced for cg_clif. cg_clif recently removed it's use of hotswapping as the way it is implemented in cranelift-jit has various issues like leaking memory, panicking when the memory allocator decided to put two functions more than 2GB away from each other and only supporting x86_64. Better hotswapping support will likely require a fundamentally different implementation.
Contributor
Author
|
If the second commit could be backported to the release-31.0.0 branch that would be appreciated. |
Member
|
For the backport I think that's reasonable, would you be ok sending a PR yourself? (no need for a subset of folks to send backports to older branches, it's ok for anyone to open a PR to the branch) |
Contributor
Author
|
Opened #10347 |
abrown
approved these changes
Mar 6, 2025
Member
abrown
left a comment
There was a problem hiding this comment.
This change seems sensible to me but I'll let @alexcrichton comment as well since he's here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It was originally introduced for cg_clif. cg_clif recently removed it's use of hotswapping as the way it is implemented in cranelift-jit has various issues like leaking memory, panicking when the memory allocator decided to put two functions more than 2GB away from each other and only supporting x86_64. Better hotswapping support will likely require a fundamentally different implementation.
Also fix a bug that prevents cg_clif from switching to is_pic=false for the jit mode.
cc #2735