https://bugs.winehq.org/show_bug.cgi?id=50424
Bug ID: 50424 Summary: std::mutex crashes on creation Product: Wine Version: 4.12.1 Hardware: arm OS: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: msvcp Assignee: wine-bugs@winehq.org Reporter: david.paradis@us.abb.com Distribution: ---
Created attachment 69041 --> https://bugs.winehq.org/attachment.cgi?id=69041 Test Project File
I have spent the better half of the last month tracking down a crash in my application related to the creation of the std::mutex object in my code. After putting many debugging messages into the Wine code I have finally found what the issue is. Here is what I have found: 1) In the dlls/msvcp90/msvcp_main.c:init_cxx_funcs() the code is calling GetProcAddress() for the critical_section methods for ctor, dtor, lock, ... but never checks to see if we found a valid address for the functions. Later on in the _Mtx_init_in_situ() a call is made to the critical section ctor and throws null pointer exceptions because the function pointer is null.
2) In the dlls/concrt140/concrt140.spec there are NO definitions for any ARM architecture method exports. In the dlls/msvcp90/msvcp90.spec there are definitions but they are missing in concrt library.
After playing with the concrt140.spec file I was able add the 5 critical section method exports to the file and was able to verify that I can now create a std::mutex object and call lock, unlock and other methods on it successfully.
At this point I have no idea how many other ARM methods are missing from the concrt140.spec list, but the distribution package does not have ANY ARM definitions in that file.
I am attaching a very simple test CPP file that I was using to verify that the code is now working for my usage but not completely fixed. With the test code and the shipping source code you will not get past the point of seeing the second printf statement after creating the test class, it will crash on the "test t1;" line.
Thank you
https://bugs.winehq.org/show_bug.cgi?id=50424
Piotr Caban piotr.caban@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED CC| |piotr.caban@gmail.com Fixed by SHA1| |2201ca08fb03d069fa2ccf46773 | |c150a6f7988bc
--- Comment #1 from Piotr Caban piotr.caban@gmail.com --- It should be working now. Marking as fixed by 2201ca08fb03d069fa2ccf46773c150a6f7988bc.
https://bugs.winehq.org/show_bug.cgi?id=50424
--- Comment #2 from David Paradis david.paradis@us.abb.com --- (In reply to Piotr Caban from comment #1)
It should be working now. Marking as fixed by 2201ca08fb03d069fa2ccf46773c150a6f7988bc.
Thank you for fixing this. What release branch was this checked in to and how do I get the updates?
I saw the checkin notification but could not figure out where it was fixed.
Thank you
https://bugs.winehq.org/show_bug.cgi?id=50424
--- Comment #3 from Piotr Caban piotr.caban@gmail.com --- It's fixed in git://source.winehq.org/git/wine.git repository (master branch). The fix will be available in upcoming wine 6.2 release (to be released on Feb 12th).
https://bugs.winehq.org/show_bug.cgi?id=50424
--- Comment #4 from David Paradis david.paradis@us.abb.com --- (In reply to Piotr Caban from comment #3)
It's fixed in git://source.winehq.org/git/wine.git repository (master branch). The fix will be available in upcoming wine 6.2 release (to be released on Feb 12th).
ok. That won't help me as we are not upgrading our devices to use the latest version of Wine as it is a huge deal to do that. I will just leave the fix that I have implemented as it is working for what we need.
If we do ever upgrade to the latest at least I know it will be fixed and I won't encounter this issue again.
Again, thank you.
https://bugs.winehq.org/show_bug.cgi?id=50424
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.2.
https://bugs.winehq.org/show_bug.cgi?id=50424
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |6.0.x
https://bugs.winehq.org/show_bug.cgi?id=50424
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|6.0.x |---
--- Comment #6 from Michael Stefaniuc mstefani@winehq.org --- Removing the 6.0.x milestone from bug fixes included in 6.0.1.