Skip to content

Keep stack from growing without bound - #1892

Merged
schweitzpgi merged 5 commits into
NVIDIA:mainfrom
schweitzpgi:ch-tame.stack
Jul 12, 2024
Merged

Keep stack from growing without bound#1892
schweitzpgi merged 5 commits into
NVIDIA:mainfrom
schweitzpgi:ch-tame.stack

Conversation

@schweitzpgi

@schweitzpgi schweitzpgi commented Jul 5, 2024

Copy link
Copy Markdown
Collaborator

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.
@github-actions

github-actions Bot commented Jul 5, 2024

Copy link
Copy Markdown

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
Copy Markdown
Collaborator Author

ping. needs a review.

Comment thread lib/Optimizer/Dialect/CC/CCOps.cpp Outdated
Co-authored-by: Ben Howe <141149032+bmhowe23@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

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

@bmhowe23 bmhowe23 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

@github-actions

Copy link
Copy Markdown

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
@github-actions

Copy link
Copy Markdown

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
@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