Misleading/non-effective usage of DetourUpdateThread in samples
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 6.4k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
As mentioned in the discussion b/w @sylveon and @bgianfo, passing GetCurrentThread() to DetourUpdateThread() is practically a NO-OP, however, probably all the samples, and the Using Detours wiki does use the API that way currently!
Command-line test case
N/A
Expected behavior
This is non-effective, and worse, misleading, giving users a false sense of security in their Detours usage. A better handling of threads should be provided at the API level (or at least more detailed code added to samples).
I haven't reviewed the code, but @sonyps5201314 has a closed PR suggesting a new API entry point (DetourUpdateAllOtherThreads). Something along those lines may be useful probably??
Detours version
Latest on master as of this issue's creation date: d8b8144
Additional context
I'll log another issue/question about the stability of the RIP changing after this. Please evaluate the issues together.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the DetourUpdateThread uses in the samples and the Using Detours wiki, then read the linked discussion and the closed PR proposing DetourUpdateAllOtherThreads. Determine whether the issue should be addressed through an API change, revised sample code, or documentation; done means the guidance no longer presents GetCurrentThread() as effective.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100