https://bugs.winehq.org/show_bug.cgi?id=54718
Bug ID: 54718 Summary: msvcr90:msvcr90 - test__get_current_locale() sometimes gets an unexpected refcount on w10pro64 Product: Wine Version: unspecified Hardware: x86-64 OS: Windows Status: NEW Severity: normal Priority: P2 Component: msvcrt Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com
msvcr90:msvcr90 - test__get_current_locale() sometimes gets an unexpected refcount on w10pro64:
msvcr90.c:2382: Test failed: refcount = 4
See https://test.winehq.org/data/patterns.html#msvcr90:msvcr90
This only happens in 64-bit tests, and only on w10pro64. Yet it has the same msvcr90 version as the other Windows 10 2004+ VMs:
w10pro64v2004 msvcr90=9.0.30729.9625 w1064v2009 msvcr90=9.0.30729.9625 w10pro64 (21H1) msvcr90=9.0.30729.9625 w1064 (22H2) msvcr90=9.0.30729.9625 w11pro64 msvcr90=9.0.30729.9635
The test already considers a refcount of 2 to be broken (without indicating why, commit f71f16319816) so maybe the same should be done for a value of 4?
https://bugs.winehq.org/show_bug.cgi?id=54718
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |cdavis5x@gmail.com Keywords| |source, testcase
https://bugs.winehq.org/show_bug.cgi?id=54718
Piotr Caban piotr.caban@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |piotr.caban@gmail.com
--- Comment #1 from Piotr Caban piotr.caban@gmail.com --- I will need to look deeper into it but it looks like there's some kind of initial C locale object. It's treated differently comparing to other locale objects, e.g. it's not freed even if its refcount reaches 0. Every time _create_locale is called, this object is copied to newly created locale (and refcounts are increased). Later some categories are overwritten without decreasing refcounts. It's a refcount leak in native implementation.
Here's a short explanation why broken was needed in refcount test: test____mb_cur_max_l_func calls create locale. If requested locale is not available - create_locale doesn't increase the initial C locale object refcounts and skip message is displayed. Because of that l2->locinfo->lc_time_curr->refcount equals 2.
In order to fix it, we will need to move test__get_current_locale tests earlier in the file. Another option is to avoid testing refcounts of this special object.
https://bugs.winehq.org/show_bug.cgi?id=54718
Piotr Caban piotr.caban@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Fixed by SHA1| |195ff4bce75915bbed5b217af10 | |0c696ed42a604 Resolution|--- |FIXED
--- Comment #2 from Piotr Caban piotr.caban@gmail.com --- Marking as fixed by 195ff4bce75915bbed5b217af100c696ed42a604. Please reopen if it's still a problem.
https://bugs.winehq.org/show_bug.cgi?id=54718
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 8.15.