[all-commits] [llvm/llvm-project] 787a5e: [memprof] Fix use-after-free in peekBuildIds.
Snehasish Kumar via All-commits
all-commits at lists.llvm.org
Wed Jul 12 14:21:50 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 787a5efb020f6020bc9b7610074cbdd55ea824f1
https://github.com/llvm/llvm-project/commit/787a5efb020f6020bc9b7610074cbdd55ea824f1
Author: Snehasish Kumar <snehasishk at google.com>
Date: 2023-07-12 (Wed, 12 Jul 2023)
Changed paths:
M llvm/lib/ProfileData/RawMemProfReader.cpp
Log Message:
-----------
[memprof] Fix use-after-free in peekBuildIds.
To check the uniqueness of buildids, we held on to a StringRef of the build id string pushed into the vector. If the number of build ids were large enough to trigger a realloc in the vector then these references where invalidated resulting in a use-after free. This was exposed in downstream usage.
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D155110
More information about the All-commits
mailing list