Skip to content

release/18.x: [PPCMergeStringPool] Only replace constant once (#92996) #93442

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

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

llvmbot
Copy link
Member

@llvmbot llvmbot commented May 27, 2024

Backport 9f85bc8

Requested by: @nikic

Copy link
Collaborator

@chenzheng1030 chenzheng1030 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cherry-pick LGTM

In llvm#88846 I changed this code to use RAUW to perform the replacement
instead of manual updates -- but kept the outer loop, which means we try
to perform RAUW once per user. However, some of the users might be freed
by the RAUW operation, resulting in use-after-free.

The case where this happens is constant users where the replacement
might result in the destruction of the original constant.

Fixes llvm#92991.

(cherry picked from commit 9f85bc8)
@tstellar
Copy link
Collaborator

tstellar commented Jun 4, 2024

What release note should we use for this change?

@tstellar tstellar merged commit 7e6ece9 into llvm:release/18.x Jun 4, 2024
10 of 12 checks passed
@nikic
Copy link
Contributor

nikic commented Jun 4, 2024

What release note should we use for this change?

Something like this maybe?

Fix a regression from the 18.1.6 release, which could result in compiler crashes in the PPCMergeStringPool pass when compiling for PowerPC targets.

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.

4 participants