-
Notifications
You must be signed in to change notification settings - Fork 146
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
Crash when injecting into 32 bit cmd #66
Comments
python's |
I'll take a look. To help me out, can you also share the output from (I assume you must have AutoRun set up to inject clink into all cmd processes, yes?) |
I can't reproduce the crash. Some questions:
What I did:
Thank you for reporting the crash, and for working with me to help resolve it! |
It is suprisingly short:
Win10 20H2. Specific build:
Yes. Just to be sure here... it is a fresh install via https://github.com/ScoopInstaller/Main/blob/master/bucket/clink.json#L10
Not applicable.
No problem uploading whatever... but no Lua. :)
Strange. Was it 32-bit python? FWIW, my system should be mostly pristine since I'm building up from scratch with a new pc build. i.e. Should be no (or at least minimal) weird system/environment issues. Would the dump file help? I assumed not so didn't include it. Thanks for looking into it! I'll try a few more things here (like looking into |
Yes the dump file would help tremendously; I was just about to ask for it. :) The dump file contains the call stack, among other things, which most of the time can pinpoint what's going wrong. |
Here's the dump: |
Good news; I can reproduce the crash now. It happens for 32 bit cmd 100% of the time. Don't know why yet. The dump showed it crashed before it could run any actual Clink code, so deeper debugging will be needed. The reason it isn't happening when you run cmd.exe directly from the shell is because the shell is 64 bit and you're running 64 bit cmd. Running 32 bit cmd.exe directly from the shell encounters the problem. Will look into it further as soon as I get a chance. |
Awesome! I'm pretty sure that my previous case where it worked with an earlier version was with 64-bit python, so I think can disregard any commentary about it working before. |
The crash was introduced in v1.1.21 by turning on support for C++ exceptions, as part of adding support for regular expressions in The problem is that the remote thread injection code must have support for C++ exceptions turned off, otherwise it will crash because the remote thread will try to call code that doesn't exist yet in the cmd.exe process. I had a bad feeling about enabling C++ exceptions for the whole project, and I should have listened to my intuition. |
This innocent line? https://github.com/chrisant996/clink/blob/master/premake5.lua#L93 |
That's the one, yup. |
1.1.24 includes the fix. Thanks again for reporting this! |
still crash when run "clink inject" with the latest version(v1.1.34) |
More info, please. 32 bit? 64 bit? |
clink info: clink log and dump: |
This new crash is not about injecting, and is unrelated to the crash that was tracked by this issue (#66). I'll open a separate new issue for this new crash, later this evening. |
great, thanks. |
I have a python script that launches a Clink subshell by executing
cmd.exe
again, and it crashes. Reproducible output below It results in the crash below:This same subprocess launch worked perfectly fine in a relatively recent Clink version (past few months?), but I'm unfortunately not sure which version since I've just installed a new clink (via scoop) since my old SSD died and this is a new environment.
Simply running
cmd.exe
in the shell itself works fine:The text was updated successfully, but these errors were encountered: