DynamoRIO / DynamoRIO/dynamorio
APP CRASH (acpacker-hostname.exe) SetThreadContext on self
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 629
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 31
Description
With version 6.2.0-2 of DynamoRio
The latest build does not solve the problem
On Windows 7, with a 32 bit application, acpacker-hostname.exe the classic hostname software packed with acpacker
I run it with (no client)
C:\rio\bin32\drrun.exe -- acpacker-hostname.exe
The expected output is a line with the hostname.
Instead we get a crash with message
SYSLOG_ERROR: Application acpacker-hostname.exe.bin (552).
Internal Error: DynamoRIO debug check failure:
dynamorio\core\synch.c:855 id != my_id
The problem is that dynamorio does not support a call to SetThreadContext with own thread id.
It can be reproduced with the following code
```
CONTEXT Context;
Context.ContextFlags = 0;
SetThreadContext(GetCurrentThread(), &Context);
```
There should be a patch in `presys_SetContextThread` and `post_system_call` to handle such cases
Contributor guide
Assessment
This issue has not been assessed yet.