Skip to content
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

Misleading/non-effective usage of DetourUpdateThread in samples #151

Open
ohuseyinoglu opened this issue Dec 1, 2020 · 1 comment
Open
Labels
bug Something isn't working

Comments

@ohuseyinoglu
Copy link

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.

@bgianfo
Copy link
Contributor

bgianfo commented Dec 2, 2020

Thanks for creating an issue to track these.

As mentioned, I believe @sonyps5201314's PR is probably the best fix for this kind of issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants