[Bug 50424] New: std::mutex crashes on creation
WineHQ Bugzilla
wine-bugs at winehq.org
Tue Dec 29 10:49:15 CST 2020
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 at winehq.org
Reporter: david.paradis at 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
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list