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

release/19.x: [ORC] Remove EDU from dependants list of dependencies before destroying. #109355

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

llvmbot
Copy link
Collaborator

@llvmbot llvmbot commented Sep 20, 2024

Backport 7034ec4

Requested by: @lhames

@tru
Copy link
Collaborator

tru commented Sep 24, 2024

Hi, since we are wrapping up this next release we are very strict with the fixes we pick at this point. Can you please respond to the following questions to help me understand if this has to be included in the final release or not.

Is this PR a fix for a regression or a critical issue?

What is the risk of accepting this into the release branch?

What is the risk of NOT accepting this into the release branch?

@lhames
Copy link
Contributor

lhames commented Sep 24, 2024

Hi, since we are wrapping up this next release we are very strict with the fixes we pick at this point. Can you please respond to the following questions to help me understand if this has to be included in the final release or not.

Sure thing @tru!

Is this PR a fix for a regression or a critical issue?

This is a fix for a critical issue affecting some JIT users who make use of ORC's concurrent compilation support.

What is the risk of accepting this into the release branch?

This fix affects only JIT users who use ORC's concurrent compilation support.

What is the risk of NOT accepting this into the release branch?

JIT users who use concurrent compilation may see crashes in both their JIT process: Failure to remove EDUs from their dependants lists may result in a use-after-free.

@tru
Copy link
Collaborator

tru commented Sep 24, 2024

Sounds like it would be safe enough. I will merge it thanks for responding!

Dependant lists hold raw pointers back to EDUs that depend on them. We need to
remove these entries before destroying the EDU or we'll be left with a dangling
reference that can result in use-after-free bugs.

No testcase: This has only been observed in multi-threaded setups that
reproduce the issue inconsistently.

rdar://135403614
(cherry picked from commit 7034ec4)
@tru tru merged commit 1c499a7 into llvm:release/19.x Sep 24, 2024
4 of 10 checks passed
Copy link

@lhames (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants