DynamoRIO / DynamoRIO/dynamorio

Translation storing interface fails to notify all parties

Open
#4,937 2 comments 0 reactions 0 assignees View on GitHub
Component-API
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 18h
Merged PRs (30d)
30

Description

Today, if any client or library requests DR_EMIT_STORE_TRANSLATIONS, DR will not use recreation to translate and will instead rely on persisted data from block creation time. However, all the other clients and libraries may not be aware that one of them requested to store translations, and will be relying on recreation. It seems that the store-translations approach is broken in the presence of multiple components.

Probably the simplest solution is to add a new callback that DR invokes after the basic block callback when someone requested to store translations. Then all components can treat the new callback kind of like a recreation, but they would persist storage of data for translation.

We should also try to provide a way to associate persisted data with a callback by a user_data pointer or something: though we'll have to handle each component having its own pointer. This avoids each party having to keep its own hashtable and worry about lifetime issues with deletion happening independently of a new block at the same tag (xref various issues with that in the past).

Contributor guide

Open the contributing guide

Research direction

Start by tracing DR_EMIT_STORE_TRANSLATIONS and the basic block callback across the affected components. Define how a new notification and per-component user_data association would work, then verify that every component is notified and can persist translation data without lifetime or same-tag deletion issues.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.