DynamoRIO / DynamoRIO/dynamorio

thread init mcontext on Windows is the post-init state, not the initial state

Open
#2,718 1 comment 0 reactions 0 assignees View on GitHub
Component-API OpSys-Windows
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

#117 and 28058da are passing the CONTEXT of the resumption point for a new thread as the initial mcontext, which does not seem like what we want at all: the thread is going to run a lot of init code and we want the start of that code to be the initial mcontext. Nobody noticed this all this time so maybe it doesn't matter much. I hit it while adding #241 where I did not have LdrInitializeThunk as a kernel xfer, yet Dr. Memory was relying on that to mark the init stack properly as the thread init event's mcontext stack doesn't cut it.

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.