[all-commits] [llvm/llvm-project] 3ddb54: [Remarks] YAMLRemarkSerializer: Fix StringRef out-...

Tobias Stadler via All-commits all-commits at lists.llvm.org
Tue Sep 23 16:13:14 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3ddb549670a89aa72a4eb13b22a47c9abf0a7923
      https://github.com/llvm/llvm-project/commit/3ddb549670a89aa72a4eb13b22a47c9abf0a7923
  Author: Tobias Stadler <mail at stadler-tobias.de>
  Date:   2025-09-24 (Wed, 24 Sep 2025)

  Changed paths:
    M llvm/lib/Remarks/YAMLRemarkSerializer.cpp
    M llvm/unittests/Remarks/YAMLRemarksSerializerTest.cpp

  Log Message:
  -----------
  [Remarks] YAMLRemarkSerializer: Fix StringRef out-of-bounds read (#159759)

YAML IO `mapRequired` expects a null-terminated `const char *` Key, so
we can't legally pass a StringRef to it. We should add StringRef Key
support to YAML IO, but for now just copy the key into a correctly
null-terminated string.

Pull Request: https://github.com/llvm/llvm-project/pull/159759



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