DynamoRIO / DynamoRIO/dynamorio

Create callback_list in drcontainers and switch to dynamic callback priorities in drmgr

Open
#1,762 11 comments 0 reactions 1 assignee Claimed by @byron-hawkins View on GitHub
Component-API Component-Extension help wanted OpSys-All Type-Feature Usability
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

The new Dr. Fuzz feature of Dr. Memory (xref drmem [#1734](https://github.com/DynamoRIO/drmemory/issues/1734)) needs a generic callback list. Since drmgr already has one, we can just move it to drcontainers and make it available to all clients.

A couple of changes should be made to the implementation to make it more friendly for general use:
1. In the add function, when the `before` priority is not `NULL`, the list should return an error if that priority is not found in the list
2. The resize function should remove invalid entries (i.e., not copy them to the new array) to minimize fragmentation for frequently modified callback lists

To avoid complications in the remove function, the list will need to allow direct index-based iteration, since existing usage by drmgr does not have a single key per entry (see `drmgr_bb_cb_remove()` in `drmgr.c`).

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.