DynamoRIO / DynamoRIO/dynamorio
ASSERT: missing decode type in core/arch/x86/disassemble.c:227
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 629
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 30
Description
In order to log the actual instructions observed at runtime, one can enable loglevel 3 by issuing the following command:
```
drrun -debug -loglevel 3 -c any_client -- any_app
```
This command runs without problems dumping the instructions in DR's own syntax. However, changing the disassembly syntax to `intel` or `att`, by adding command line option `-syntax_intel` or `-syntax_att` respectively, would trigger the above mentioned assertion which can be found [here](https://github.com/DynamoRIO/dynamorio/blob/master/core/arch/x86/disassemble.c#L228).
I've debugged this issue a bit and it seems like the assertion is triggered by instruction `syscall` which is called by `ld-linux-x86-64.so.2`. The instruction `syscall` does not have a matching `optype`. The issue is independent of the client used or the instrumented application since it's triggered by the loader.
I'm using DR 6.2.0 on an x86_64 machine running Ubuntu 16.04
Contributor guide
Research direction
Start in core/arch/x86/disassemble.c around line 228 and reproduce the assertion with drrun -debug -loglevel 3 using -syntax_intel or -syntax_att. Check how the syscall instruction is handled when it lacks a matching optype. Done means the loader no longer triggers the assertion and runtime instructions are logged in the requested syntax.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux, ubuntu
- Domain
- operating-systems, reverse-engineering
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100