Skip to content

Conversation

NuriAmari
Copy link
Contributor

OutputFilename and Filename are assigned to StringRefs in parseArgs, but after parseArgs returns the InputArgsList that once owned the underlying strings is popped off the stack, and the StringRefs can be left pointing at garbage.

Switch to std::string to own the strings.

`OutputFilename` and `Filename` are assigned to StringRefs in
`parseArgs`, but after `parseArgs` returns the `InputArgsList` that once
owned the underlying strings is popped off the stack, and the StringRefs
can be left pointing at garbage.

Switch to std::string to own the strings.
@NuriAmari NuriAmari requested a review from kyulee-com June 6, 2025 21:52
Copy link
Contributor

@kyulee-com kyulee-com left a comment

Choose a reason for hiding this comment

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

LGTM

@NuriAmari NuriAmari merged commit 6a21dfa into llvm:main Jun 7, 2025
10 of 11 checks passed
tomtor pushed a commit to tomtor/llvm-project that referenced this pull request Jun 14, 2025
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