DynamoRIO / DynamoRIO/dynamorio

tool.scheduler.unit_tests broken on ARM/AArch32

Open
#7,173 2 comments 0 reactions 0 assignees View on GitHub
OpSys-ARM
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

`tool.scheduler.unit_tests` seems to be broken on ARM/AArch32 since bd7f3eb1bde7c76a8919e90ba829435fa242bdfa (@derekbruening, May 2023).

The problem seems to be that [`memref_is_nop_instr`](https://github.com/DynamoRIO/dynamorio/blob/7203e72333c273b3ac132a26be537abd197d0888/clients/drcachesim/tests/scheduler_unit_tests.cpp#L130-L141) calls `decode` in a way that always decodes as A32 so a T32 NOP instruction is not recognised. So I can make it pass by inserting `if (*(uint *)record.instr.encoding == 0xe320f000) return true;` into that function.

Would it make sense to rewrite `memref_is_nop_instr` so that instead of using the decoder it just recognises the encodings, like how `next_record` [works](https://github.com/DynamoRIO/dynamorio/blob/7203e72333c273b3ac132a26be537abd197d0888/clients/drcachesim/scheduler/speculator.cpp#L103-L115)? Or is there a better way?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.