angr / simuvex

[DEPRECATED] A symbolic execution engine for the VEX IR
BSD 2-Clause "Simplified" License
79 stars 57 forks source link

Passing memory endness info from SimState to SimMemory #145

Closed YHZX2013 closed 7 years ago

YHZX2013 commented 7 years ago

The default endness of SimMemory is "Iend_BE", it won't pass the arch endness info to SimMemory in original code.

rhelmot commented 7 years ago

The default endness being big-endian regardless of architecture is intentional, and there is a lot of code which relies on this behavior. state.memory is meant to be a really basic memory access interface designed for loading chunks of bytes, not structured information like endian-swapped words. If you want to extract integer data and expect endians to work by default, you should use state.mem instead. Take a look at https://docs.angr.io/docs/structured_data.html