[Lldb-commits] [lldb] 4004f65 - [LLDB][NativePDB] Fix use-after-free error detected by asan.
Zequan Wu via lldb-commits
lldb-commits at lists.llvm.org
Thu Jan 4 09:32:49 PST 2024
Author: Zequan Wu
Date: 2024-01-04T12:32:40-05:00
New Revision: 4004f655ceb9623608ba0471aa7037c142956e31
URL: https://github.com/llvm/llvm-project/commit/4004f655ceb9623608ba0471aa7037c142956e31
DIFF: https://github.com/llvm/llvm-project/commit/4004f655ceb9623608ba0471aa7037c142956e31.diff
LOG: [LLDB][NativePDB] Fix use-after-free error detected by asan.
Added:
Modified:
lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
index 8375010ae3dedd..9234768323e713 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
@@ -2265,7 +2265,8 @@ void SymbolFileNativePDB::BuildParentMap() {
}
for (TypeIndex fwd : fwd_keys) {
TypeIndex full = forward_to_full[fwd];
- m_parent_types[full] = m_parent_types[fwd];
+ TypeIndex parent_idx = m_parent_types[fwd];
+ m_parent_types[full] = parent_idx;
}
for (TypeIndex full : full_keys) {
TypeIndex fwd = full_to_forward[full];
More information about the lldb-commits
mailing list