Skip to content

[tools] Fix segfault in cudaq-translate when emit-llvm=0 - #1557

Merged
schweitzpgi merged 1 commit into
NVIDIA:mainfrom
fabianmcg:pr-fix-segfault
Apr 23, 2024
Merged

schweitzpgi merged 1 commit into
NVIDIA:mainfrom
fabianmcg:pr-fix-segfault

Conversation

@fabianmcg

@fabianmcg fabianmcg commented Apr 23, 2024 •

Copy link
Copy Markdown
Contributor

This patch fixes a segmentation fault in cudaq-translate when --emit-llvm is false. The issue occurs because the initialization lambda has non-trivial storage, and llvm::function_ref only holds a reference to a function, trashing the lambda after initialization.

This patch fixes a segmentation fault in `cudaq-translate` when "--emit-llvm" is
false. The issue occurs because the initialization lambda has non-trivial
storage, and `llvm::function_ref` only holds a reference to a function, trashing
the lambda after initialization.
@copy-pr-bot

copy-pr-bot Bot commented Apr 23, 2024

Copy link
Copy Markdown

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.

@github-actions

github-actions Bot commented Apr 23, 2024 •

Copy link
Copy Markdown

CLA Assistant Lite bot All Contributors have signed the CLA.

@fabianmcg

Copy link
Copy Markdown
Contributor Author

I have read the Contributor License Agreement and I hereby accept the Terms.

@fabianmcg

Copy link
Copy Markdown
Contributor Author

recheck

@schweitzpgi

schweitzpgi commented Apr 23, 2024 •

Copy link
Copy Markdown
Collaborator

/ok to test

Command Bot: Processing...

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

Thanks for the bug fix, Fabian.

github-actions Bot pushed a commit that referenced this pull request Apr 23, 2024
@github-actions

Copy link
Copy Markdown

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

@schweitzpgi
schweitzpgi merged commit 5e42a01 into NVIDIA:main Apr 23, 2024
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 23, 2024
@fabianmcg
fabianmcg deleted the pr-fix-segfault branch April 23, 2024 17:19
@bettinaheim bettinaheim added this to the release 0.7.1 milestone Apr 30, 2024
@bettinaheim bettinaheim added the bug fix To be listed under Bug Fixes in the release notes label Apr 30, 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