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

[Opt] Fix use after free (erase) in mem2reg #628

Merged
merged 2 commits into from
Sep 11, 2023

Conversation

boschmitt
Copy link
Collaborator

Description

The pass collects operations to clean up in one container and use two loops to erase different kinds. The problem is that the first loop was erasing operations while leaving their pointers. Then, the second loop would try to cast the erased operations of those pointers and the garbage.

This PR simply changes the behavior to first drop all uses of the operations and, on a third loop, actually to the erasing.

@copy-pr-bot
Copy link

copy-pr-bot bot commented Sep 8, 2023

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@boschmitt boschmitt marked this pull request as ready for review September 8, 2023 17:20
@schweitzpgi
Copy link
Collaborator

Thanks for fixing the bug, Bruno.

@amccaskey
Copy link
Collaborator

amccaskey commented Sep 9, 2023

/ok to test

Command Bot: Processing...

@amccaskey amccaskey enabled auto-merge (squash) September 9, 2023 13:32
@github-actions
Copy link

github-actions bot commented Sep 9, 2023

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Sep 9, 2023
@schweitzpgi
Copy link
Collaborator

schweitzpgi commented Sep 11, 2023

/ok to test

Command Bot: Processing...

@amccaskey amccaskey merged commit 4e63416 into NVIDIA:main Sep 11, 2023
100 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 11, 2023
@bettinaheim bettinaheim added the bug fix To be listed under Bug Fixes in the release notes label Sep 27, 2023
@bettinaheim bettinaheim added this to the release 0.4.1 milestone Sep 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fix To be listed under Bug Fixes in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants