Skip to content

Commit

Permalink
core/memory: fixed crash in single-path mode
Browse files Browse the repository at this point in the history
The abort was unnecessary. The memory contains concrete data at all times
and can be returned as an expression.

Signed-off-by: Vitaly Chipounov <vitaly@chipounov.fr>
  • Loading branch information
vitalych committed Sep 21, 2024
1 parent 0d4a21e commit 2bfb1fc
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions libs2ecore/src/S2EExecutionStateMemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,12 @@ uint64_t S2EExecutionStateMemory::getHostAddress(uint64_t address, AddressType a
/***/

ref<Expr> S2EExecutionStateMemory::read(uint64_t address, Expr::Width width, AddressType addressType) {
#ifdef CONFIG_SYMBEX_MP
auto translate = [&](uint64_t addressToTranslate, uint64_t &hostAddress) -> bool {
hostAddress = getHostAddress(addressToTranslate, addressType);
return hostAddress != (uint64_t) -1;
};

return m_addressSpace->read(address, width, translate);
#else
pabort("Not implemented");
#endif
}

ref<Expr> S2EExecutionStateMemory::readMemory8(uint64_t address, AddressType addressType) {
Expand Down

0 comments on commit 2bfb1fc

Please sign in to comment.