[all-commits] [llvm/llvm-project] 06a583: [Remarks] YAMLRemarkSerializer: StringRef-ize apis...
Jon Roelofs via All-commits
all-commits at lists.llvm.org
Wed Sep 24 07:41:28 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 06a5834aa849d85892d1b2cb6d41bfa9f15d4cef
https://github.com/llvm/llvm-project/commit/06a5834aa849d85892d1b2cb6d41bfa9f15d4cef
Author: Jon Roelofs <jonathan_roelofs at apple.com>
Date: 2025-09-24 (Wed, 24 Sep 2025)
Changed paths:
M llvm/include/llvm/Support/YAMLTraits.h
M llvm/lib/Remarks/YAMLRemarkSerializer.cpp
M llvm/lib/Support/YAMLTraits.cpp
Log Message:
-----------
[Remarks] YAMLRemarkSerializer: StringRef-ize apis to avoid out-of-bounds read footguns (#160397)
In #159759, Tobias identified that because YAML IO `mapRequired`
expected a null-terminated `const char * Key`, we couldn't legally pass
a `StringRef` to it, as that might be length-terminated and not
null-terminated. In this patch, we move all of the YAML IO functions
that accept a `const char *` over to `StringRef`, avoiding that footgun
altogether.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list