Skip to content

Conversation

@dc03-work
Copy link
Contributor

Patch 1/2 fixes a use-after-free found using ASan. Patch 2/2 fixes various uninitialized variable warnings that were found using valgrind.

dc03-work added 2 commits July 2, 2025 21:51
This patch fixes a use-after-free that was causing a memory corruption
error. The filenames set would be created, written into, then copied
into a vector of string_view. After the scope exit, the string_views
were read and would have dangling references to the destroyed set.
@erozenfeld
Copy link
Contributor

These changes look good to me.

@dc03-work
Copy link
Contributor Author

ping @snehasish - this seems like a low-risk patch

Copy link
Collaborator

@snehasish snehasish left a comment

Choose a reason for hiding this comment

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

lgtm, will merge after the CI run.

@snehasish snehasish merged commit d4daf24 into google:master Jul 24, 2025
2 checks passed
dc03-work added a commit to dc03-work/autofdo that referenced this pull request Oct 9, 2025
This patch fixes a use-after-free that was causing a memory corruption
error. The filenames set would be created, written into, then copied
into a vector of string_view. After the scope exit, the string_views
were read and would have dangling references to the destroyed set.
Also fix uninitialized variable warnings from valgrind.
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.

3 participants