[llvm] [llvm] Validate Parent object before dereference (PR #157460)
Daniel Kuts via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 9 02:18:39 PDT 2025
================
@@ -472,10 +472,10 @@ Archive::Child::Child(const Archive *Parent, const char *Start, Error *Err)
return;
}
+ assert(Parent && "Parent can't be nullptr if Start is not a nullptr");
----------------
apach301 wrote:
Are we assume that Parent is always non-NULL here, so that both assert and check in parameter could be removed?
https://github.com/llvm/llvm-project/pull/157460
More information about the llvm-commits
mailing list