DynamoRIO / DynamoRIO/dynamorio
Add dynamic checks that the drmemtrace redzone is not exceeded
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 629
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 31
Description
From https://github.com/DynamoRIO/dynamorio/pull/8114#discussion_r4009412280
Currently the redzone allows 2 records for every instr in a max-bb-instr block so 512 records. Even without this PR, that could be theoretically exceeded by a whole bunch of multi-memref instrs, but it is pretty unlikely. I don't know that we have an actual check though which we could have.
The idea is we'd count up the records and ensure enough headroom for kernel event or other dynamic records and issue an error on a pathological block.
Contributor guide
Research direction
Start by tracing drmemtrace's redzone accounting around max-bb-instr blocks and how records are counted for multi-memref instructions. Identify where kernel-event and other dynamic records are reserved, then add a check that reports an error when a pathological block would exceed available headroom. Validate the check with a block that exceeds the redzone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100