mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-27 22:02:33 +01:00
In `SourceGenTest.IdentifierByteSumStableAcrossSeeds`, the `first` variable was storing `llvm::StringRef`s pointing to memory allocated by a temporary `SourceGen` instance. This memory was freed at the end of the loop iteration, leaving `first` with dangling references that were accessed in subsequent iterations. Fix this by storing `std::string` copies of the identifiers in `first` to own the memory, and use `llvm::equal` to compare them. Assisted-by: Antigravity with Gemini