From e770787be101e522425f658f76e4bb3091498f99 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Fri, 1 Jun 2007 22:23:29 +0000 Subject: For PR1486: Avoid overwriting the APInt instance with 0 bytes which causes the bitwidth to be set to 0 (illegal) producing a subsequent assert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37391 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/Interpreter/Execution.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ExecutionEngine/Interpreter/Execution.cpp') diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp index 0fff38cdec..281f774193 100644 --- a/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -610,7 +610,7 @@ void Interpreter::popStackAndReturnValueToCaller (const Type *RetTy, if (RetTy && RetTy->isInteger()) { // Nonvoid return type? ExitValue = Result; // Capture the exit value of the program } else { - memset(&ExitValue, 0, sizeof(ExitValue)); + memset(&ExitValue.Untyped, 0, sizeof(ExitValue.Untyped)); } } else { // If we have a previous stack frame, and we have a previous call, -- cgit v1.2.3-18-g5258