From 8eabd0f4a1612d85d172a0a3edbb6f0ecd595b27 Mon Sep 17 00:00:00 2001 From: Siddharth Priya Date: Sun, 17 Sep 2023 16:27:04 -0400 Subject: [PATCH] fix: memhavoc should be mem def --- lib/seadsa/ShadowMem.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/seadsa/ShadowMem.cc b/lib/seadsa/ShadowMem.cc index ad774ac3..cc0ea334 100644 --- a/lib/seadsa/ShadowMem.cc +++ b/lib/seadsa/ShadowMem.cc @@ -1251,9 +1251,10 @@ void ShadowMemImpl::visitMemhavoc(CallBase &I) { } m_B->SetInsertPoint(&I); - CallInst &memUse = - mkShadowLoad(*m_B, cell, dsa::getTypeSizeInBytes(*ptr.getType(), *m_dl)); - associateConcretePtr(memUse, ptr, &I); + CallInst &memDef = mkShadowStore( + *m_B, cell, + dsa::getTypeSizeInBytes(*ptr.getType(), *m_dl) /* bytes to access */); + associateConcretePtr(memDef, ptr, &I); } void ShadowMemImpl::visitIsModified(CallBase &I) {