-
Notifications
You must be signed in to change notification settings - Fork 546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add better support for decoding different ISAs in different standalone tool threads #6690
Labels
Comments
edeiana
added a commit
that referenced
this issue
Mar 6, 2024
Documents the fact that standalone dcontext_t is not fully thread-safe, hence parallel analysis tools should be aware that when different threads set DR ISA mode at the same time a race condition happens. Issue #6690
Looks like we have a pre-existing bug on the multi-dcontext solution: #1595. It points at the AArch32 global |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As documented at https://dynamorio.org/API_BT.html#sec_isa, each instr_t has its own ISA mode for
encoding. However, for decoding, the dcontext's ISA mode is used, and instandalone mode we have
just the global dcontext which uses a global ISA mode var. Thus, there is not good support for
a standalone tool that wanted to decode multiple ISA modes in separate tool threads.
One possibility would be to honor the ISA mode set in the instr_t passed for decoding, for decoding
routines that take an instr (so this would not help something like decode_sizeof).
Another possibility would be to use toolchain TLS support to create per-thread dcontext_t instances
in standalone mode, which would give us lock-free local heap for non-STATIC_LIBRARY for thread-private
objects.
The text was updated successfully, but these errors were encountered: