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

Fix use after move to get exegesis annotator working in pipeline #249

Merged

Conversation

boomanaiden154
Copy link
Collaborator

This patch fixes a user after move in BHiveToExegesis/related classes where we would create a LLVMState, pass it into a couple other constructors to create things that would store a reference to LLVMState, and then promptly move it to call the BHiveToExegesis constructor. This resulted in use after moves, which were ultimately caught by ubsan. This patch fixes that behavior by encapsulating LLVMState within a unique_ptr to prevent the problems.

The exegesis annotator is also enabled in the compile_modules invocation script and test coverage is added now that it works.

This patch fixes a user after move in BHiveToExegesis/related classes
where we would create a LLVMState, pass it into a couple other
constructors to create things that would store a reference to LLVMState,
and then promptly move it to call the BHiveToExegesis constructor. This
resulted in use after moves, which were ultimately caught by ubsan. This
patch fixes that behavior by encapsulating LLVMState within a unique_ptr
to prevent the problems.

The exegesis annotator is also enabled in the compile_modules invocation
script and test coverage is added now that it works.
@boomanaiden154 boomanaiden154 merged commit e22d54c into google:main Oct 30, 2024
7 checks passed
@boomanaiden154 boomanaiden154 deleted the compile-modules-pipeline-exegesis branch October 30, 2024 02:29
boomanaiden154 added a commit to boomanaiden154/gematria that referenced this pull request Oct 30, 2024
This patch passes unique_ptrs within bhive_to_exegesis by value rather
than by r-value reference.

Suggested in google#249.
boomanaiden154 added a commit that referenced this pull request Oct 30, 2024
This patch passes unique_ptrs within bhive_to_exegesis by value rather
than by r-value reference.

Suggested in #249.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants