https://bugs.winehq.org/show_bug.cgi?id=38220
Bug ID: 38220 Summary: Chemcraft crashes with wine-1.7.38 Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: vityokster@gmail.com Distribution: ---
Created attachment 51020 --> https://bugs.winehq.org/attachment.cgi?id=51020 Chemcraft crash backtrace
After upgrading wine from 1.7.33 to 1.7.38 Chemcraft_b405 (http://chemcraftprog.com/files/Chemcraft_b405_win.exe) doesn't start anymore.
I try bisecting following http://wiki.winehq.org/RegressionTesting. Git says that f16cf541068831074a6891688d947f0ce32abdd9 comit is the first bad commit. I try ot revert this commit but it's failed because of some commits with this code was made.
Also I reproduce this crash with the current git wine (ed92458754ce21b4d4719168515866fc1bb340ad).
I attach backtrace which was made by winedebugger.
P.S. Old versions of Chemcraft (b382 and below) works with wine-1.7.38.
https://bugs.winehq.org/show_bug.cgi?id=38220
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, regression URL| |http://chemcraftprog.com/fi | |les/Chemcraft_b405_win.exe CC| |00cpxxx@gmail.com, | |sebastian@fds-team.de Version|unspecified |1.7.38 Regression SHA1| |f16cf541068831074a6891688d9 | |47f0ce32abdd9
--- Comment #1 from Sebastian Lackner sebastian@fds-team.de --- Adding the author of the specific commit.
https://bugs.winehq.org/show_bug.cgi?id=38220
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #2 from Bruno Jesus 00cpxxx@gmail.com --- Thanks for the bug report, I can reproduce the error myself. I don't know why the commit caused the issue since the program uses GetTempPathA instead of GetTempPathW and the buffer passed from A to W is always good. Maybe related to the EXECryptor used by the application, I'll have to test when I have more time.
https://bugs.winehq.org/show_bug.cgi?id=38220
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |kernel32
https://bugs.winehq.org/show_bug.cgi?id=38220
--- Comment #3 from Bruno Jesus 00cpxxx@gmail.com --- This simple change makes it work for me, changing the variable with its value. Any hints?
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c index 7fe229f..8f590da 100644 --- a/dlls/kernel32/path.c +++ b/dlls/kernel32/path.c @@ -623,7 +623,7 @@ DWORD WINAPI GetTempPathW( DWORD count, LPWSTR path ) { lstrcpynW(path, tmp_path, count); /* the remaining buffer must be zeroed */ - memset(path + ret, 0, (count - ret) * sizeof(WCHAR)); + memset(path + ret, 0, (260 - ret) * sizeof(WCHAR)); ret--; /* return length without 0 */ } else if (count)
https://bugs.winehq.org/show_bug.cgi?id=38220
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|wine-bugs@winehq.org |00cpxxx@gmail.com
--- Comment #4 from Bruno Jesus 00cpxxx@gmail.com --- Ok, I just found the issue. My first assumption was wrong, it doesn't call GetTempPathA, just GetTempPathW.
The problem is that the count value passed is 65534 but the buffer does not seem to really have that size so the memset to clear the memory makes the application crash. I'll add more tests for such invalid sizes and check what native does.
https://bugs.winehq.org/show_bug.cgi?id=38220
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Chemcraft crashes with |Chemcraft crashes |wine-1.7.38 |
https://bugs.winehq.org/show_bug.cgi?id=38220
Sergey isakov-sl@bk.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |isakov-sl@bk.ru
--- Comment #5 from Sergey isakov-sl@bk.ru --- I also can confirm this bug and I made regression test. Something wrong with my attempt, it said ~~~~ The first bad commit could be any of: 2f804307bda0f62ac23c9a3387e185150868fede 7f618695c624f532300ecff8735f94fec3f3a86c 8ed9c2a11bf8a61909ef0940d0dee3611a6c003e db80aba5ad526b8691dace1c4c20b5cbc85389a4 1fcc75299f3e640ec60ef3caade9d14fa2e1299a We cannot bisect more!
~~~~
I am looking around and have one doubt ~~~~ if (!gl_info->supported[ARB_DRAW_INSTANCED] && !gl_info->supported[ARB_INSTANCED_ARRAYS]) { FIXME("Instanced drawing not supported.\n"); } else {
~~~~ should it be || instead of && ? "else" will be executed if (1 && 0) that leads to crash.
https://bugs.winehq.org/show_bug.cgi?id=38220
--- Comment #6 from Bruno Jesus 00cpxxx@gmail.com --- Hi, Sergey. I believe you posted to the wrong bug. This bug is well-known and in process of getting fixed already.
https://bugs.winehq.org/show_bug.cgi?id=38220
--- Comment #7 from Sergey isakov-sl@bk.ru --- (In reply to Bruno Jesus from comment #6)
Hi, Sergey. I believe you posted to the wrong bug. This bug is well-known and in process of getting fixed already.
I just think it is related because I found it here.
https://bugs.winehq.org/show_bug.cgi?id=38220
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |24fc876e616db6f2249811c21c2 | |c399c57c7df2f Status|ASSIGNED |RESOLVED Resolution|--- |FIXED
--- Comment #8 from Bruno Jesus 00cpxxx@gmail.com --- Fixed by http://source.winehq.org/git/wine.git/?a=commit;h=24fc876e616db6f2249811c21c...
Thanks for the bug report.
https://bugs.winehq.org/show_bug.cgi?id=38220
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.39.
https://bugs.winehq.org/show_bug.cgi?id=38220
--- Comment #10 from Sebastian Lackner sebastian@fds-team.de --- The application DipTrace was also affected by this, leaving this note here so that its also documented on the upstream bugtracker:
https://bugs.wine-staging.com/show_bug.cgi?id=173