https://bugs.winehq.org/show_bug.cgi?id=51052
Bug ID: 51052 Summary: 6.4 regression: 32-bit Cheat Engine attaching its debugger leads to the target process crashing Product: Wine Version: 6.4 Hardware: x86-64 URL: https://cheatengine.org/downloads.php OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: subgraph93@gmail.com Regression SHA1: af74bd31229e0f065448253b248ec0cb3b51af26 Distribution: Ubuntu
Steps to reproduce: 1) Install Cheat Engine (version 7.2 is affected, so is 7.1). 2) Start up cheatengine-i386.exe. 3) In the same prefix, start up the target process. No other software is needed, because the issue can be reproduced with CE tutorials. To start up the tutorial, open the "Help" dropdown menu and click the "Cheat Engine Tutorial" entry. 4) Open the process selection window: File > Open Process; or just click the flashing icon that shows the computer display with a magnifying glass. 5) In the "Applications" view (it is probably default), there should be an entry for Cheat Engine itself, and one for "Tutorial-i386". Select the latter entry, then click "Attach debugger to process", then click "Yes" in the confirmation modal. 6) When the debugger attaches (should be near-instant for release builds, but unoptimized builds can take about a minute), the process selection window will close. At this point, the target process may crash already, but in some cases it may still work. If the tutorial window still displays, switching focus to it should cause the crash. In some cases, the target process crashes before this happens, and Cheat Engine gives a "failed to attach debugger" error instead.
Logs almost always have the following entry (thread ID and the address may vary): 013c:err:seh:NtRaiseException Unhandled exception code c000008f flags 0 addr 0xf7b80644 In one case (on a dirty prefix, which may or may not matter; the issue otherwise still happens on a clean prefix), the error code was not c000008f, but c00002b5. In some cases as well, in addition to the above error and immediately before it, the following is output: 01d0:fixme:seh:fpe_handler untested SIMD exception: 0x6. Might not work correctly I didn't notice other major differences in console logs compared to working Wine versions, so I didn't attach complete terminal outputs.
Regression testing (which I hope I did correctly) points to: commit af74bd31229e0f065448253b248ec0cb3b51af26 Author: Jacek Caban jacek@codeweavers.com Date: Tue Mar 2 18:52:44 2021 +0100
ntdll: Use syscall dispatcher to restore context in NtSetContextThread.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
Other notes: 1) Ubuntu 20.10 2) Wine 6.7 (devel and staging) are still affected. 3) 64-bit Cheat Engine crashed neither 64-bit nor 32-bit target processes, though it has issues working with 32-bit target processes. 4) This can be reproduced with most, but not all target processes. I think targeting a 64-bit process doesn't cause the issue, though I wouldn't expect debugging to work anyway with 32-bit CE. For example of a process that didn't crash, I couldn't crash winecfg. My testing seems to indicate that the behavior of a process is consistent in terms of whether or not it crashes, how it crashes, and what terminal messages are output; however, different processes may have slightly different behavior.
https://bugs.winehq.org/show_bug.cgi?id=51052
subgraph93@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, regression
https://bugs.winehq.org/show_bug.cgi?id=51052
Anton Baskanov baskanov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |baskanov@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=51052
--- Comment #1 from subgraph93@gmail.com --- This issue appears to be fixed in the latest git version.
Thank you all for your contributions to Wine.
https://bugs.winehq.org/show_bug.cgi?id=51052
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #2 from Gijs Vermeulen gijsvrm@gmail.com --- Thanks for reporting back, marking FIXED.
https://bugs.winehq.org/show_bug.cgi?id=51052
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.12.