-
Notifications
You must be signed in to change notification settings - Fork 55
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
ResumeThread causes crash when unfreezing, possibly due to unhandled SuspendThread error #52
Comments
Try using this PR and see if your issue goes away #51 However that is still quite strange if GetThreadId is crashing, I haven't heard of this. Would need to look at a disassembled dump of the surrounding bytes in ntdll |
The only thing I can think of off the top of my head is that something in the TEB or PEB may be invalid for a short time, but still will need the surrounding bytes of where it crashed |
Well that was a fun 3 hours. Turns out GetThreadId wasn't causing the crash, it just consistently happened after a previous ResumeThread call that caused the crash. Looking at the freezer, I see I'll check later but I need a break. |
One thing I kind of had an issue with with the suspender was that it just goes through the entire thread list again with the same NtGetNextThread rather than keeping a list of previously suspended handles (or thread id's and using NtOpenThread) and just iterating over those. Because any thread could be destroyed or created in the process of iterating over existing ones. Did you try out the trapping PR? |
Yes I did, I hit some issues and I don't quite remember exactly what it was
but I'll try again.
…On Tue, Feb 20, 2024, 7:10 PM praydog ***@***.***> wrote:
One thing I kind of had an issue with with the suspender was that it just
goes through the entire thread list again with the same NtGetNextThread
rather than keeping a list of previously suspended handles (or thread id's
and using NtOpenThread) and just iterating over those. Because any thread
could be destroyed or created in the process of iterating over existing
ones.
Did you try out the trapping PR?
—
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKHIPCAIQN7CZ5VFDXJEG3DYUVJRVAVCNFSM6AAAAABBXFEZUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJVG42DANZQGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Sorry if this isn't enough information, threading is not my strong suit. Please let me know.
I'll occasionally get access violation errors when using a midhook for an x64 program. This is happening when the threads are resumed.
I read up on GetThreadId and from what I understand, it shouldn't be possible to crash the program. It's showing an access violation at 0x0.
Please let me know what I need to send to help with this. Thanks.
The text was updated successfully, but these errors were encountered: