From 910fa151f5bc3e67932a6c42394341f96fac3280 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) {