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

Keep stack from growing without bound #1892

Merged
merged 5 commits into from
Jul 12, 2024

Conversation

schweitzpgi
Copy link
Collaborator

@schweitzpgi schweitzpgi commented Jul 5, 2024

This fixes a bug where classical variables may be allocated on the stack without bound. Instead, use the scope information to bound the lifetimes of classical variables and prevent a standard loop from accidentally exhausting the stack.

We haven't encountered this issue because we have focused on SCPs and totally unrolling all the loops. This patch is a preventative fix.

This fixes a bug where classical variables may be allocated on the stack
without bound. Instead, use the scope information to bound the lifetimes
of classical variables and prevent a standard loop from accidentally
exhausting the stack.

We haven't encountered this issue because we have focused on SCPs and
totally unrolling all the loops. This patch is preventative maintenance.

Add test.
Copy link

github-actions bot commented Jul 5, 2024

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

github-actions bot pushed a commit that referenced this pull request Jul 5, 2024
@schweitzpgi
Copy link
Collaborator Author

ping. needs a review.

Copy link

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

github-actions bot pushed a commit that referenced this pull request Jul 10, 2024
Copy link
Collaborator

@bmhowe23 bmhowe23 left a comment

Choose a reason for hiding this comment

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

👍

Copy link

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

github-actions bot pushed a commit that referenced this pull request Jul 11, 2024
@schweitzpgi schweitzpgi enabled auto-merge (squash) July 12, 2024 15:34
Copy link

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

github-actions bot pushed a commit that referenced this pull request Jul 12, 2024
@schweitzpgi schweitzpgi merged commit de00607 into NVIDIA:main Jul 12, 2024
125 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 12, 2024
@schweitzpgi schweitzpgi deleted the ch-tame.stack branch July 12, 2024 21:24
@bettinaheim bettinaheim added the bug fix To be listed under Bug Fixes in the release notes label Jul 29, 2024
@bettinaheim bettinaheim added this to the release 0.8.0 milestone Jul 29, 2024
@bettinaheim bettinaheim changed the title [core] Insert guards to keep stack from growing without bound. Keep stack from growing without bound Jul 29, 2024
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.

3 participants