Check validity of the value in Memory::store's assertion
MODIFY
ir/memory.cpp
ir/memory.cpp
@@ -779,7 +779,7 @@ void Memory::store(const expr &p, const StateValue &v, const Type &type,
} else {
vector<Byte> bytes = valueToBytes(v, type, *this);
- assert(bytes.size() * bytesz == getStoreByteSize(type));
+ assert(!v.isValid() || bytes.size() * bytesz == getStoreByteSize(type));
for (unsigned i = 0, e = bytes.size(); i < e; ++i) {
auto ptr_i = ptr + (little_endian ? i * bytesz :

MODIFY
scripts/opt-alive.sh
scripts/opt-alive.sh
set -e
# IPO passes aren't supported ATM
-PASSES="argpromotion deadargelim globalopt hotcoldsplit inline ipconstprop ipsccp mergefunc partial-inliner tbaa -Os -Oz -O1 -O2 -O3"
+PASSES="argpromotion deadargelim globalopt hotcoldsplit inline ipconstprop ipsccp mergefunc partial-inliner tbaa insert-gcov-profiling -Os -Oz -O1 -O2 -O3"
TV="-tv"
for p in $PASSES; do

Check validity of the value in Memory::store's assertion (#208)