[all-commits] [llvm/llvm-project] 508398: [libc] Add hardening for FixedVector data structur...
Alexey Samsonov via All-commits
all-commits at lists.llvm.org
Wed Jan 8 13:04:21 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 508398021d094ecfe6cea937d619c77121990e0d
https://github.com/llvm/llvm-project/commit/508398021d094ecfe6cea937d619c77121990e0d
Author: Alexey Samsonov <vonosmas at gmail.com>
Date: 2025-01-08 (Wed, 08 Jan 2025)
Changed paths:
M libc/src/__support/CMakeLists.txt
M libc/src/__support/fixedvector.h
M libc/src/stdlib/exit_handler.h
M utils/bazel/llvm-project-overlay/libc/BUILD.bazel
Log Message:
-----------
[libc] Add hardening for FixedVector data structure and fix exposed bug. (#122159)
Add LIBC_ASSERT statements to FixedVector implementation, and zero out
the memory when the elements are removed to flag out-of-bound access and
dangling pointer/reference access.
This change unmasks the bug in one of FixedVector uses for atexit
handlers: dangling reference use, which was actually led to crashes in
the wild (with prod blockstore implementation). Fix it in this CL.
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