DynamoRIO / dynamorio

Dynamic Instrumentation Tool Platform
Other
2.63k stars 557 forks source link

AArch64: ASSERT when tracing stg using memval_simple #6796

Closed jackgallagher-arm closed 4 months ago

jackgallagher-arm commented 5 months ago

The AArch64 MTE instruction stg stores an allocation tag. The operand signature for the instructions looks like a store instruction and memval_simple treats it like a regular store, but the memory ref operand has the size OPSZ_0 and memval_simple crashes with an assert failure in drx_buf.c:

ASSERT FAILURE: dynamorio/ext/drx/drx_buf.c:661: (0) ()

This instruction does not write to regular memory, it stores an allocation tag to tag memory so instr_writes_memory() should return false for stg instructions allowing clients like memval_simple to filter them out easily.