[all-commits] [llvm/llvm-project] ac2fb4: [ProfileData] Bound binary sample profile primitiv...
Sergey Shcherbinin via All-commits
all-commits at lists.llvm.org
Mon Sep 14 21:39:22 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ac2fb41926f9f7723517670788800d448970151a
https://github.com/llvm/llvm-project/commit/ac2fb41926f9f7723517670788800d448970151a
Author: Sergey Shcherbinin <sscherbinin at nvidia.com>
Date: 2026-09-15 (Tue, 15 Sep 2026)
Changed paths:
M llvm/include/llvm/Support/LEB128.h
M llvm/lib/ProfileData/SampleProfReader.cpp
M llvm/unittests/ProfileData/SampleProfTest.cpp
M llvm/unittests/Support/LEB128Test.cpp
Log Message:
-----------
[ProfileData] Bound binary sample profile primitive reads (#215476)
Fix pre-existing latent memory-safety issues that could cause
out-of-bounds reads or invalid pointer arithmetic on malformed,
truncated, or non-null-terminated buffers:
* unbounded ULEB128 decoding in readNumber() and Raw/Ext format probes;
* unbounded terminator searches in readString() and GCC format
detection;
* unsafe bounds checking in readUnencodedNumber().
Use bounded decoding, memchr, overflow-safe size checks, and typed
ULEB128 errors. Preserve the existing decodeULEB128 interface and avoid
test-only ABI exports.
Add functional and guard-page tests that detect boundary regressions
without requiring sanitizers.
Assisted by GPT-5
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