[PATCH] D153118: CurInst is not initialized to nullptr, may exist in wild pointer access

SylvanasX via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 16 02:59:06 PDT 2023


SylvanasX created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
SylvanasX requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

I don't have commit access


https://reviews.llvm.org/D153118

Files:
  llvm/lib/ExecutionEngine/Interpreter/Interpreter.h


Index: llvm/lib/ExecutionEngine/Interpreter/Interpreter.h
===================================================================
--- llvm/lib/ExecutionEngine/Interpreter/Interpreter.h
+++ llvm/lib/ExecutionEngine/Interpreter/Interpreter.h
@@ -66,7 +66,7 @@
   std::vector<GenericValue>  VarArgs; // Values passed through an ellipsis
   AllocaHolder Allocas;            // Track memory allocated by alloca
 
-  ExecutionContext() : CurFunction(nullptr), CurBB(nullptr), CurInst(nullptr) {}
+  ExecutionContext() : CurFunction(nullptr), CurBB(nullptr), CurInst(nullptr), Caller(nullptr) {}
 };
 
 // Interpreter - This class represents the entirety of the interpreter.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153118.532064.patch
Type: text/x-patch
Size: 664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230616/6c7737b8/attachment.bin>


More information about the llvm-commits mailing list