Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
January 2020
- 75 participants
- 1522 messages
Re: [PATCH v2 8/8] msvcrt: Increment refcounts for all locale data in _get_current_locale().
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=64296
Your paranoid android.
=== debian10 (32 bit report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
msvcr90:
msvcr90.c:2022: Test failed: refcount = 2
msvcr90.c:2031: Test failed: refcount = 4 for category 2
msvcr90.c:2031: Test failed: refcount = 4 for category 3
msvcr90.c:2031: Test failed: refcount = 4 for category 4
msvcr90.c:2031: Test failed: refcount = 4 for category 5
msvcr90.c:2048: Test failed: refcount = 4
msvcr90.c:2052: Test failed: refcount = 4
msvcr90.c:2056: Test failed: refcount = 4
msvcr90.c:2060: Test failed: refcount = 4
msvcr90.c:2064: Test failed: refcount = 4
msvcr90.c:2079: Test failed: refcount = 2 for category 1
msvcr90.c:2081: Test failed: refcount = 3 for category 1
msvcr90.c:2079: Test failed: refcount = 3 for category 2
msvcr90.c:2089: Test failed: refcount = 5 for category 3
msvcr90.c:2089: Test failed: refcount = 5 for category 4
msvcr90.c:2089: Test failed: refcount = 5 for category 5
msvcr90.c:2106: Test failed: refcount = 3
msvcr90.c:2111: Test failed: refcount = 5
msvcr90.c:2115: Test failed: refcount = 5
msvcr90.c:2119: Test failed: refcount = 5
msvcr90.c:2123: Test failed: refcount = 5
msvcr90.c:2138: Test failed: refcount = 2 for category 1
msvcr90.c:2140: Test failed: refcount = 4 for category 1
msvcr90.c:2138: Test failed: refcount = 3 for category 2
msvcr90.c:2140: Test failed: refcount = 3 for category 2
msvcr90.c:2138: Test failed: refcount = 4 for category 3
msvcr90.c:2148: Test failed: refcount = 6 for category 4
msvcr90.c:2148: Test failed: refcount = 6 for category 5
msvcr90.c:2165: Test failed: refcount = 3
msvcr90.c:2170: Test failed: refcount = 4
msvcr90.c:2175: Test failed: refcount = 6
msvcr90.c:2179: Test failed: refcount = 4
msvcr90.c:2184: Test failed: refcount = 6
msvcr90.c:2199: Test failed: refcount = 2 for category 1
msvcr90.c:2201: Test failed: refcount = 5 for category 1
msvcr90.c:2199: Test failed: refcount = 3 for category 2
msvcr90.c:2201: Test failed: refcount = 4 for category 2
msvcr90.c:2199: Test failed: refcount = 4 for category 3
msvcr90.c:2201: Test failed: refcount = 3 for category 3
msvcr90.c:2199: Test failed: refcount = 5 for category 4
msvcr90.c:2208: Test failed: refcount = 7
msvcr90.c:2224: Test failed: refcount = 3
msvcr90.c:2229: Test failed: refcount = 4
msvcr90.c:2234: Test failed: refcount = 5
msvcr90.c:2239: Test failed: refcount = 4
msvcr90.c:2244: Test failed: refcount = 7
msvcr90.c:2259: Test failed: refcount = 2 for category 1
msvcr90.c:2261: Test failed: refcount = 6 for category 1
msvcr90.c:2259: Test failed: refcount = 3 for category 2
msvcr90.c:2261: Test failed: refcount = 5 for category 2
msvcr90.c:2259: Test failed: refcount = 4 for category 3
msvcr90.c:2261: Test failed: refcount = 4 for category 3
msvcr90.c:2259: Test failed: refcount = 5 for category 4
msvcr90.c:2261: Test failed: refcount = 3 for category 4
msvcr90.c:2259: Test failed: refcount = 6 for category 5
msvcr90.c:2278: Test failed: refcount = 3
msvcr90.c:2283: Test failed: refcount = 4
msvcr90.c:2288: Test failed: refcount = 5
msvcr90.c:2293: Test failed: refcount = 4
msvcr90.c:2298: Test failed: refcount = 6
msvcr90.c:2300: Test failed: refcount = 6
=== debian10 (32 bit French report) ===
msvcr90:
msvcr90.c:2022: Test failed: refcount = 2
msvcr90.c:2031: Test failed: refcount = 4 for category 2
msvcr90.c:2031: Test failed: refcount = 4 for category 3
msvcr90.c:2031: Test failed: refcount = 4 for category 4
msvcr90.c:2031: Test failed: refcount = 4 for category 5
msvcr90.c:2048: Test failed: refcount = 4
msvcr90.c:2052: Test failed: refcount = 4
msvcr90.c:2056: Test failed: refcount = 4
msvcr90.c:2060: Test failed: refcount = 4
msvcr90.c:2064: Test failed: refcount = 4
msvcr90.c:2079: Test failed: refcount = 2 for category 1
msvcr90.c:2081: Test failed: refcount = 3 for category 1
msvcr90.c:2079: Test failed: refcount = 3 for category 2
msvcr90.c:2089: Test failed: refcount = 5 for category 3
msvcr90.c:2089: Test failed: refcount = 5 for category 4
msvcr90.c:2089: Test failed: refcount = 5 for category 5
msvcr90.c:2106: Test failed: refcount = 3
msvcr90.c:2111: Test failed: refcount = 5
msvcr90.c:2115: Test failed: refcount = 5
msvcr90.c:2119: Test failed: refcount = 5
msvcr90.c:2123: Test failed: refcount = 5
msvcr90.c:2138: Test failed: refcount = 2 for category 1
msvcr90.c:2140: Test failed: refcount = 4 for category 1
msvcr90.c:2138: Test failed: refcount = 3 for category 2
msvcr90.c:2140: Test failed: refcount = 3 for category 2
msvcr90.c:2138: Test failed: refcount = 4 for category 3
msvcr90.c:2148: Test failed: refcount = 6 for category 4
msvcr90.c:2148: Test failed: refcount = 6 for category 5
msvcr90.c:2165: Test failed: refcount = 3
msvcr90.c:2170: Test failed: refcount = 4
msvcr90.c:2175: Test failed: refcount = 6
msvcr90.c:2179: Test failed: refcount = 4
msvcr90.c:2184: Test failed: refcount = 6
msvcr90.c:2199: Test failed: refcount = 2 for category 1
msvcr90.c:2201: Test failed: refcount = 5 for category 1
msvcr90.c:2199: Test failed: refcount = 3 for category 2
msvcr90.c:2201: Test failed: refcount = 4 for category 2
msvcr90.c:2199: Test failed: refcount = 4 for category 3
msvcr90.c:2201: Test failed: refcount = 3 for category 3
msvcr90.c:2199: Test failed: refcount = 5 for category 4
msvcr90.c:2208: Test failed: refcount = 7
msvcr90.c:2224: Test failed: refcount = 3
msvcr90.c:2229: Test failed: refcount = 4
msvcr90.c:2234: Test failed: refcount = 5
msvcr90.c:2239: Test failed: refcount = 4
msvcr90.c:2244: Test failed: refcount = 7
msvcr90.c:2259: Test failed: refcount = 2 for category 1
msvcr90.c:2261: Test failed: refcount = 6 for category 1
msvcr90.c:2259: Test failed: refcount = 3 for category 2
msvcr90.c:2261: Test failed: refcount = 5 for category 2
msvcr90.c:2259: Test failed: refcount = 4 for category 3
msvcr90.c:2261: Test failed: refcount = 4 for category 3
msvcr90.c:2259: Test failed: refcount = 5 for category 4
msvcr90.c:2261: Test failed: refcount = 3 for category 4
msvcr90.c:2259: Test failed: refcount = 6 for category 5
msvcr90.c:2278: Test failed: refcount = 3
msvcr90.c:2283: Test failed: refcount = 4
msvcr90.c:2288: Test failed: refcount = 5
msvcr90.c:2293: Test failed: refcount = 4
msvcr90.c:2298: Test failed: refcount = 6
msvcr90.c:2300: Test failed: refcount = 6
=== debian10 (32 bit Japanese:Japan report) ===
msvcr90:
msvcr90.c:2022: Test failed: refcount = 2
msvcr90.c:2031: Test failed: refcount = 4 for category 2
msvcr90.c:2031: Test failed: refcount = 4 for category 3
msvcr90.c:2031: Test failed: refcount = 4 for category 4
msvcr90.c:2031: Test failed: refcount = 4 for category 5
msvcr90.c:2048: Test failed: refcount = 4
msvcr90.c:2052: Test failed: refcount = 4
msvcr90.c:2056: Test failed: refcount = 4
msvcr90.c:2060: Test failed: refcount = 4
msvcr90.c:2064: Test failed: refcount = 4
msvcr90.c:2079: Test failed: refcount = 2 for category 1
msvcr90.c:2081: Test failed: refcount = 3 for category 1
msvcr90.c:2079: Test failed: refcount = 3 for category 2
msvcr90.c:2089: Test failed: refcount = 5 for category 3
msvcr90.c:2089: Test failed: refcount = 5 for category 4
msvcr90.c:2089: Test failed: refcount = 5 for category 5
msvcr90.c:2106: Test failed: refcount = 3
msvcr90.c:2111: Test failed: refcount = 5
msvcr90.c:2115: Test failed: refcount = 5
msvcr90.c:2119: Test failed: refcount = 5
msvcr90.c:2123: Test failed: refcount = 5
msvcr90.c:2138: Test failed: refcount = 2 for category 1
msvcr90.c:2140: Test failed: refcount = 4 for category 1
msvcr90.c:2138: Test failed: refcount = 3 for category 2
msvcr90.c:2140: Test failed: refcount = 3 for category 2
msvcr90.c:2138: Test failed: refcount = 4 for category 3
msvcr90.c:2148: Test failed: refcount = 6 for category 4
msvcr90.c:2148: Test failed: refcount = 6 for category 5
msvcr90.c:2165: Test failed: refcount = 3
msvcr90.c:2170: Test failed: refcount = 4
msvcr90.c:2175: Test failed: refcount = 6
msvcr90.c:2179: Test failed: refcount = 4
msvcr90.c:2184: Test failed: refcount = 6
msvcr90.c:2199: Test failed: refcount = 2 for category 1
msvcr90.c:2201: Test failed: refcount = 5 for category 1
msvcr90.c:2199: Test failed: refcount = 3 for category 2
msvcr90.c:2201: Test failed: refcount = 4 for category 2
msvcr90.c:2199: Test failed: refcount = 4 for category 3
msvcr90.c:2201: Test failed: refcount = 3 for category 3
msvcr90.c:2199: Test failed: refcount = 5 for category 4
msvcr90.c:2208: Test failed: refcount = 7
msvcr90.c:2224: Test failed: refcount = 3
msvcr90.c:2229: Test failed: refcount = 4
msvcr90.c:2234: Test failed: refcount = 5
msvcr90.c:2239: Test failed: refcount = 4
msvcr90.c:2244: Test failed: refcount = 7
msvcr90.c:2259: Test failed: refcount = 2 for category 1
msvcr90.c:2261: Test failed: refcount = 6 for category 1
msvcr90.c:2259: Test failed: refcount = 3 for category 2
msvcr90.c:2261: Test failed: refcount = 5 for category 2
msvcr90.c:2259: Test failed: refcount = 4 for category 3
msvcr90.c:2261: Test failed: refcount = 4 for category 3
msvcr90.c:2259: Test failed: refcount = 5 for category 4
msvcr90.c:2261: Test failed: refcount = 3 for category 4
msvcr90.c:2259: Test failed: refcount = 6 for category 5
msvcr90.c:2278: Test failed: refcount = 3
msvcr90.c:2283: Test failed: refcount = 4
msvcr90.c:2288: Test failed: refcount = 5
msvcr90.c:2293: Test failed: refcount = 4
msvcr90.c:2298: Test failed: refcount = 6
msvcr90.c:2300: Test failed: refcount = 6
=== debian10 (32 bit Chinese:China report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
msvcr90:
msvcr90.c:2022: Test failed: refcount = 2
msvcr90.c:2031: Test failed: refcount = 4 for category 2
msvcr90.c:2031: Test failed: refcount = 4 for category 3
msvcr90.c:2031: Test failed: refcount = 4 for category 4
msvcr90.c:2031: Test failed: refcount = 4 for category 5
msvcr90.c:2048: Test failed: refcount = 4
msvcr90.c:2052: Test failed: refcount = 4
msvcr90.c:2056: Test failed: refcount = 4
msvcr90.c:2060: Test failed: refcount = 4
msvcr90.c:2064: Test failed: refcount = 4
msvcr90.c:2079: Test failed: refcount = 2 for category 1
msvcr90.c:2081: Test failed: refcount = 3 for category 1
msvcr90.c:2079: Test failed: refcount = 3 for category 2
msvcr90.c:2089: Test failed: refcount = 5 for category 3
msvcr90.c:2089: Test failed: refcount = 5 for category 4
msvcr90.c:2089: Test failed: refcount = 5 for category 5
msvcr90.c:2106: Test failed: refcount = 3
msvcr90.c:2111: Test failed: refcount = 5
msvcr90.c:2115: Test failed: refcount = 5
msvcr90.c:2119: Test failed: refcount = 5
msvcr90.c:2123: Test failed: refcount = 5
msvcr90.c:2138: Test failed: refcount = 2 for category 1
msvcr90.c:2140: Test failed: refcount = 4 for category 1
msvcr90.c:2138: Test failed: refcount = 3 for category 2
msvcr90.c:2140: Test failed: refcount = 3 for category 2
msvcr90.c:2138: Test failed: refcount = 4 for category 3
msvcr90.c:2148: Test failed: refcount = 6 for category 4
msvcr90.c:2148: Test failed: refcount = 6 for category 5
msvcr90.c:2165: Test failed: refcount = 3
msvcr90.c:2170: Test failed: refcount = 4
msvcr90.c:2175: Test failed: refcount = 6
msvcr90.c:2179: Test failed: refcount = 4
msvcr90.c:2184: Test failed: refcount = 6
msvcr90.c:2199: Test failed: refcount = 2 for category 1
msvcr90.c:2201: Test failed: refcount = 5 for category 1
msvcr90.c:2199: Test failed: refcount = 3 for category 2
msvcr90.c:2201: Test failed: refcount = 4 for category 2
msvcr90.c:2199: Test failed: refcount = 4 for category 3
msvcr90.c:2201: Test failed: refcount = 3 for category 3
msvcr90.c:2199: Test failed: refcount = 5 for category 4
msvcr90.c:2208: Test failed: refcount = 7
msvcr90.c:2224: Test failed: refcount = 3
msvcr90.c:2229: Test failed: refcount = 4
msvcr90.c:2234: Test failed: refcount = 5
msvcr90.c:2239: Test failed: refcount = 4
msvcr90.c:2244: Test failed: refcount = 7
msvcr90.c:2259: Test failed: refcount = 2 for category 1
msvcr90.c:2261: Test failed: refcount = 6 for category 1
msvcr90.c:2259: Test failed: refcount = 3 for category 2
msvcr90.c:2261: Test failed: refcount = 5 for category 2
msvcr90.c:2259: Test failed: refcount = 4 for category 3
msvcr90.c:2261: Test failed: refcount = 4 for category 3
msvcr90.c:2259: Test failed: refcount = 5 for category 4
msvcr90.c:2261: Test failed: refcount = 3 for category 4
msvcr90.c:2259: Test failed: refcount = 6 for category 5
msvcr90.c:2278: Test failed: refcount = 3
msvcr90.c:2283: Test failed: refcount = 4
msvcr90.c:2288: Test failed: refcount = 5
msvcr90.c:2293: Test failed: refcount = 4
msvcr90.c:2298: Test failed: refcount = 6
msvcr90.c:2300: Test failed: refcount = 6
=== debian10 (32 bit WoW report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
msvcr90:
msvcr90.c:2022: Test failed: refcount = 2
msvcr90.c:2031: Test failed: refcount = 4 for category 2
msvcr90.c:2031: Test failed: refcount = 4 for category 3
msvcr90.c:2031: Test failed: refcount = 4 for category 4
msvcr90.c:2031: Test failed: refcount = 4 for category 5
msvcr90.c:2048: Test failed: refcount = 4
msvcr90.c:2052: Test failed: refcount = 4
msvcr90.c:2056: Test failed: refcount = 4
msvcr90.c:2060: Test failed: refcount = 4
msvcr90.c:2064: Test failed: refcount = 4
msvcr90.c:2079: Test failed: refcount = 2 for category 1
msvcr90.c:2081: Test failed: refcount = 3 for category 1
msvcr90.c:2079: Test failed: refcount = 3 for category 2
msvcr90.c:2089: Test failed: refcount = 5 for category 3
msvcr90.c:2089: Test failed: refcount = 5 for category 4
msvcr90.c:2089: Test failed: refcount = 5 for category 5
msvcr90.c:2106: Test failed: refcount = 3
msvcr90.c:2111: Test failed: refcount = 5
msvcr90.c:2115: Test failed: refcount = 5
msvcr90.c:2119: Test failed: refcount = 5
msvcr90.c:2123: Test failed: refcount = 5
msvcr90.c:2138: Test failed: refcount = 2 for category 1
msvcr90.c:2140: Test failed: refcount = 4 for category 1
msvcr90.c:2138: Test failed: refcount = 3 for category 2
msvcr90.c:2140: Test failed: refcount = 3 for category 2
msvcr90.c:2138: Test failed: refcount = 4 for category 3
msvcr90.c:2148: Test failed: refcount = 6 for category 4
msvcr90.c:2148: Test failed: refcount = 6 for category 5
msvcr90.c:2165: Test failed: refcount = 3
msvcr90.c:2170: Test failed: refcount = 4
msvcr90.c:2175: Test failed: refcount = 6
msvcr90.c:2179: Test failed: refcount = 4
msvcr90.c:2184: Test failed: refcount = 6
msvcr90.c:2199: Test failed: refcount = 2 for category 1
msvcr90.c:2201: Test failed: refcount = 5 for category 1
msvcr90.c:2199: Test failed: refcount = 3 for category 2
msvcr90.c:2201: Test failed: refcount = 4 for category 2
msvcr90.c:2199: Test failed: refcount = 4 for category 3
msvcr90.c:2201: Test failed: refcount = 3 for category 3
msvcr90.c:2199: Test failed: refcount = 5 for category 4
msvcr90.c:2208: Test failed: refcount = 7
msvcr90.c:2224: Test failed: refcount = 3
msvcr90.c:2229: Test failed: refcount = 4
msvcr90.c:2234: Test failed: refcount = 5
msvcr90.c:2239: Test failed: refcount = 4
msvcr90.c:2244: Test failed: refcount = 7
msvcr90.c:2259: Test failed: refcount = 2 for category 1
msvcr90.c:2261: Test failed: refcount = 6 for category 1
msvcr90.c:2259: Test failed: refcount = 3 for category 2
msvcr90.c:2261: Test failed: refcount = 5 for category 2
msvcr90.c:2259: Test failed: refcount = 4 for category 3
msvcr90.c:2261: Test failed: refcount = 4 for category 3
msvcr90.c:2259: Test failed: refcount = 5 for category 4
msvcr90.c:2261: Test failed: refcount = 3 for category 4
msvcr90.c:2259: Test failed: refcount = 6 for category 5
msvcr90.c:2278: Test failed: refcount = 3
msvcr90.c:2283: Test failed: refcount = 4
msvcr90.c:2288: Test failed: refcount = 5
msvcr90.c:2293: Test failed: refcount = 4
msvcr90.c:2298: Test failed: refcount = 6
msvcr90.c:2300: Test failed: refcount = 6
=== debian10 (64 bit WoW report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
msvcr90:
msvcr90.c:2022: Test failed: refcount = 2
msvcr90.c:2031: Test failed: refcount = 4 for category 2
msvcr90.c:2031: Test failed: refcount = 4 for category 3
msvcr90.c:2031: Test failed: refcount = 4 for category 4
msvcr90.c:2031: Test failed: refcount = 4 for category 5
msvcr90.c:2048: Test failed: refcount = 4
msvcr90.c:2052: Test failed: refcount = 4
msvcr90.c:2056: Test failed: refcount = 4
msvcr90.c:2060: Test failed: refcount = 4
msvcr90.c:2064: Test failed: refcount = 4
msvcr90.c:2079: Test failed: refcount = 2 for category 1
msvcr90.c:2081: Test failed: refcount = 3 for category 1
msvcr90.c:2079: Test failed: refcount = 3 for category 2
msvcr90.c:2089: Test failed: refcount = 5 for category 3
msvcr90.c:2089: Test failed: refcount = 5 for category 4
msvcr90.c:2089: Test failed: refcount = 5 for category 5
msvcr90.c:2106: Test failed: refcount = 3
msvcr90.c:2111: Test failed: refcount = 5
msvcr90.c:2115: Test failed: refcount = 5
msvcr90.c:2119: Test failed: refcount = 5
msvcr90.c:2123: Test failed: refcount = 5
msvcr90.c:2138: Test failed: refcount = 2 for category 1
msvcr90.c:2140: Test failed: refcount = 4 for category 1
msvcr90.c:2138: Test failed: refcount = 3 for category 2
msvcr90.c:2140: Test failed: refcount = 3 for category 2
msvcr90.c:2138: Test failed: refcount = 4 for category 3
msvcr90.c:2148: Test failed: refcount = 6 for category 4
msvcr90.c:2148: Test failed: refcount = 6 for category 5
msvcr90.c:2165: Test failed: refcount = 3
msvcr90.c:2170: Test failed: refcount = 4
msvcr90.c:2175: Test failed: refcount = 6
msvcr90.c:2179: Test failed: refcount = 4
msvcr90.c:2184: Test failed: refcount = 6
msvcr90.c:2199: Test failed: refcount = 2 for category 1
msvcr90.c:2201: Test failed: refcount = 5 for category 1
msvcr90.c:2199: Test failed: refcount = 3 for category 2
msvcr90.c:2201: Test failed: refcount = 4 for category 2
msvcr90.c:2199: Test failed: refcount = 4 for category 3
msvcr90.c:2201: Test failed: refcount = 3 for category 3
msvcr90.c:2199: Test failed: refcount = 5 for category 4
msvcr90.c:2208: Test failed: refcount = 7
msvcr90.c:2224: Test failed: refcount = 3
msvcr90.c:2229: Test failed: refcount = 4
msvcr90.c:2234: Test failed: refcount = 5
msvcr90.c:2239: Test failed: refcount = 4
msvcr90.c:2244: Test failed: refcount = 7
msvcr90.c:2259: Test failed: refcount = 2 for category 1
msvcr90.c:2261: Test failed: refcount = 6 for category 1
msvcr90.c:2259: Test failed: refcount = 3 for category 2
msvcr90.c:2261: Test failed: refcount = 5 for category 2
msvcr90.c:2259: Test failed: refcount = 4 for category 3
msvcr90.c:2261: Test failed: refcount = 4 for category 3
msvcr90.c:2259: Test failed: refcount = 5 for category 4
msvcr90.c:2261: Test failed: refcount = 3 for category 4
msvcr90.c:2259: Test failed: refcount = 6 for category 5
msvcr90.c:2278: Test failed: refcount = 3
msvcr90.c:2283: Test failed: refcount = 4
msvcr90.c:2288: Test failed: refcount = 5
msvcr90.c:2293: Test failed: refcount = 4
msvcr90.c:2298: Test failed: refcount = 6
msvcr90.c:2300: Test failed: refcount = 6
Jan. 31, 2020
Re: [PATCH v2 7/8] msvcrt: Swap the threadlocinfo pointers in setlocale().
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=64295
Your paranoid android.
=== debian10 (32 bit report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
=== debian10 (32 bit Chinese:China report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
=== debian10 (32 bit WoW report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
=== debian10 (64 bit WoW report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
Jan. 31, 2020
Re: [PATCH 6/8] msvcrt: Share __lc_time_data between threadlocinfo instances.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=64294
Your paranoid android.
=== debian10 (32 bit report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
msvcr120:
msvcr120.c:494: Test failed: 0 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 0 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 1 - lc_names[3] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 1 - lc_names[4] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 2 - lc_names[3] = (null), expected L"zh"
msvcr120.c:494: Test failed: 2 - lc_names[4] = (null), expected L"zh"
msvcr120.c:494: Test failed: 3 - lc_names[3] = (null), expected L"nl"
msvcr120.c:494: Test failed: 3 - lc_names[4] = (null), expected L"nl"
msvcr120.c:494: Test failed: 4 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 4 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 5 - lc_names[3] = (null), expected L"fr"
msvcr120.c:494: Test failed: 5 - lc_names[4] = (null), expected L"fr"
msvcr120.c:494: Test failed: 6 - lc_names[3] = (null), expected L"de"
msvcr120.c:494: Test failed: 6 - lc_names[4] = (null), expected L"de"
msvcr120.c:494: Test failed: 7 - lc_names[3] = (null), expected L"hu"
msvcr120.c:494: Test failed: 7 - lc_names[4] = (null), expected L"hu"
msvcr120.c:494: Test failed: 8 - lc_names[3] = (null), expected L"is"
msvcr120.c:494: Test failed: 8 - lc_names[4] = (null), expected L"is"
msvcr120.c:494: Test failed: 9 - lc_names[3] = (null), expected L"ja"
msvcr120.c:494: Test failed: 9 - lc_names[4] = (null), expected L"ja"
msvcr120.c:494: Test failed: 10 - lc_names[3] = (null), expected L"ko"
msvcr120.c:494: Test failed: 10 - lc_names[4] = (null), expected L"ko"
=== debian10 (32 bit Chinese:China report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
msvcr120:
msvcr120.c:494: Test failed: 0 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 0 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 1 - lc_names[3] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 1 - lc_names[4] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 2 - lc_names[3] = (null), expected L"zh"
msvcr120.c:494: Test failed: 2 - lc_names[4] = (null), expected L"zh"
msvcr120.c:494: Test failed: 3 - lc_names[3] = (null), expected L"nl"
msvcr120.c:494: Test failed: 3 - lc_names[4] = (null), expected L"nl"
msvcr120.c:494: Test failed: 4 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 4 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 5 - lc_names[3] = (null), expected L"fr"
msvcr120.c:494: Test failed: 5 - lc_names[4] = (null), expected L"fr"
msvcr120.c:494: Test failed: 6 - lc_names[3] = (null), expected L"de"
msvcr120.c:494: Test failed: 6 - lc_names[4] = (null), expected L"de"
msvcr120.c:494: Test failed: 7 - lc_names[3] = (null), expected L"hu"
msvcr120.c:494: Test failed: 7 - lc_names[4] = (null), expected L"hu"
msvcr120.c:494: Test failed: 8 - lc_names[3] = (null), expected L"is"
msvcr120.c:494: Test failed: 8 - lc_names[4] = (null), expected L"is"
msvcr120.c:494: Test failed: 9 - lc_names[3] = (null), expected L"ja"
msvcr120.c:494: Test failed: 9 - lc_names[4] = (null), expected L"ja"
msvcr120.c:494: Test failed: 10 - lc_names[3] = (null), expected L"ko"
msvcr120.c:494: Test failed: 10 - lc_names[4] = (null), expected L"ko"
=== debian10 (32 bit WoW report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
msvcr120:
msvcr120.c:494: Test failed: 0 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 0 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 1 - lc_names[3] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 1 - lc_names[4] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 2 - lc_names[3] = (null), expected L"zh"
msvcr120.c:494: Test failed: 2 - lc_names[4] = (null), expected L"zh"
msvcr120.c:494: Test failed: 3 - lc_names[3] = (null), expected L"nl"
msvcr120.c:494: Test failed: 3 - lc_names[4] = (null), expected L"nl"
msvcr120.c:494: Test failed: 4 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 4 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 5 - lc_names[3] = (null), expected L"fr"
msvcr120.c:494: Test failed: 5 - lc_names[4] = (null), expected L"fr"
msvcr120.c:494: Test failed: 6 - lc_names[3] = (null), expected L"de"
msvcr120.c:494: Test failed: 6 - lc_names[4] = (null), expected L"de"
msvcr120.c:494: Test failed: 7 - lc_names[3] = (null), expected L"hu"
msvcr120.c:494: Test failed: 7 - lc_names[4] = (null), expected L"hu"
msvcr120.c:494: Test failed: 8 - lc_names[3] = (null), expected L"is"
msvcr120.c:494: Test failed: 8 - lc_names[4] = (null), expected L"is"
msvcr120.c:494: Test failed: 9 - lc_names[3] = (null), expected L"ja"
msvcr120.c:494: Test failed: 9 - lc_names[4] = (null), expected L"ja"
msvcr120.c:494: Test failed: 10 - lc_names[3] = (null), expected L"ko"
msvcr120.c:494: Test failed: 10 - lc_names[4] = (null), expected L"ko"
=== debian10 (64 bit WoW report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
msvcr120:
msvcr120.c:494: Test failed: 0 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 0 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 1 - lc_names[3] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 1 - lc_names[4] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 2 - lc_names[3] = (null), expected L"zh"
msvcr120.c:494: Test failed: 2 - lc_names[4] = (null), expected L"zh"
msvcr120.c:494: Test failed: 3 - lc_names[3] = (null), expected L"nl"
msvcr120.c:494: Test failed: 3 - lc_names[4] = (null), expected L"nl"
msvcr120.c:494: Test failed: 4 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 4 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 5 - lc_names[3] = (null), expected L"fr"
msvcr120.c:494: Test failed: 5 - lc_names[4] = (null), expected L"fr"
msvcr120.c:494: Test failed: 6 - lc_names[3] = (null), expected L"de"
msvcr120.c:494: Test failed: 6 - lc_names[4] = (null), expected L"de"
msvcr120.c:494: Test failed: 7 - lc_names[3] = (null), expected L"hu"
msvcr120.c:494: Test failed: 7 - lc_names[4] = (null), expected L"hu"
msvcr120.c:494: Test failed: 8 - lc_names[3] = (null), expected L"is"
msvcr120.c:494: Test failed: 8 - lc_names[4] = (null), expected L"is"
msvcr120.c:494: Test failed: 9 - lc_names[3] = (null), expected L"ja"
msvcr120.c:494: Test failed: 9 - lc_names[4] = (null), expected L"ja"
msvcr120.c:494: Test failed: 10 - lc_names[3] = (null), expected L"ko"
msvcr120.c:494: Test failed: 10 - lc_names[4] = (null), expected L"ko"
Jan. 31, 2020
Re: [PATCH 3/8] msvcrt: Share ctype tables between threadlocinfo instances.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=64291
Your paranoid android.
=== debian10 (32 bit report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
=== debian10 (32 bit Chinese:China report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
=== debian10 (32 bit WoW report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
=== debian10 (64 bit WoW report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
Jan. 31, 2020
Re: [PATCH v2 2/8] msvcrt: Share locale names between threadlocinfo instances.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=64290
Your paranoid android.
=== debian10 (32 bit report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
=== debian10 (32 bit Chinese:China report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
=== debian10 (32 bit WoW report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
=== debian10 (64 bit WoW report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
Jan. 31, 2020
Re: [PATCH 5/8] msvcrt: Copy LC_COLLATE codepage between threadlocinfo instances.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=64293
Your paranoid android.
=== debian10 (32 bit report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
msvcr120:
msvcr120.c:494: Test failed: 0 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 0 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 1 - lc_names[3] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 1 - lc_names[4] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 2 - lc_names[3] = (null), expected L"zh"
msvcr120.c:494: Test failed: 2 - lc_names[4] = (null), expected L"zh"
msvcr120.c:494: Test failed: 3 - lc_names[3] = (null), expected L"nl"
msvcr120.c:494: Test failed: 3 - lc_names[4] = (null), expected L"nl"
msvcr120.c:494: Test failed: 4 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 4 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 5 - lc_names[3] = (null), expected L"fr"
msvcr120.c:494: Test failed: 5 - lc_names[4] = (null), expected L"fr"
msvcr120.c:494: Test failed: 6 - lc_names[3] = (null), expected L"de"
msvcr120.c:494: Test failed: 6 - lc_names[4] = (null), expected L"de"
msvcr120.c:494: Test failed: 7 - lc_names[3] = (null), expected L"hu"
msvcr120.c:494: Test failed: 7 - lc_names[4] = (null), expected L"hu"
msvcr120.c:494: Test failed: 8 - lc_names[3] = (null), expected L"is"
msvcr120.c:494: Test failed: 8 - lc_names[4] = (null), expected L"is"
msvcr120.c:494: Test failed: 9 - lc_names[3] = (null), expected L"ja"
msvcr120.c:494: Test failed: 9 - lc_names[4] = (null), expected L"ja"
msvcr120.c:494: Test failed: 10 - lc_names[3] = (null), expected L"ko"
msvcr120.c:494: Test failed: 10 - lc_names[4] = (null), expected L"ko"
=== debian10 (32 bit Chinese:China report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
msvcr120:
msvcr120.c:494: Test failed: 0 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 0 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 1 - lc_names[3] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 1 - lc_names[4] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 2 - lc_names[3] = (null), expected L"zh"
msvcr120.c:494: Test failed: 2 - lc_names[4] = (null), expected L"zh"
msvcr120.c:494: Test failed: 3 - lc_names[3] = (null), expected L"nl"
msvcr120.c:494: Test failed: 3 - lc_names[4] = (null), expected L"nl"
msvcr120.c:494: Test failed: 4 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 4 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 5 - lc_names[3] = (null), expected L"fr"
msvcr120.c:494: Test failed: 5 - lc_names[4] = (null), expected L"fr"
msvcr120.c:494: Test failed: 6 - lc_names[3] = (null), expected L"de"
msvcr120.c:494: Test failed: 6 - lc_names[4] = (null), expected L"de"
msvcr120.c:494: Test failed: 7 - lc_names[3] = (null), expected L"hu"
msvcr120.c:494: Test failed: 7 - lc_names[4] = (null), expected L"hu"
msvcr120.c:494: Test failed: 8 - lc_names[3] = (null), expected L"is"
msvcr120.c:494: Test failed: 8 - lc_names[4] = (null), expected L"is"
msvcr120.c:494: Test failed: 9 - lc_names[3] = (null), expected L"ja"
msvcr120.c:494: Test failed: 9 - lc_names[4] = (null), expected L"ja"
msvcr120.c:494: Test failed: 10 - lc_names[3] = (null), expected L"ko"
msvcr120.c:494: Test failed: 10 - lc_names[4] = (null), expected L"ko"
=== debian10 (32 bit WoW report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
msvcr120:
msvcr120.c:494: Test failed: 0 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 0 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 1 - lc_names[3] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 1 - lc_names[4] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 2 - lc_names[3] = (null), expected L"zh"
msvcr120.c:494: Test failed: 2 - lc_names[4] = (null), expected L"zh"
msvcr120.c:494: Test failed: 3 - lc_names[3] = (null), expected L"nl"
msvcr120.c:494: Test failed: 3 - lc_names[4] = (null), expected L"nl"
msvcr120.c:494: Test failed: 4 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 4 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 5 - lc_names[3] = (null), expected L"fr"
msvcr120.c:494: Test failed: 5 - lc_names[4] = (null), expected L"fr"
msvcr120.c:494: Test failed: 6 - lc_names[3] = (null), expected L"de"
msvcr120.c:494: Test failed: 6 - lc_names[4] = (null), expected L"de"
msvcr120.c:494: Test failed: 7 - lc_names[3] = (null), expected L"hu"
msvcr120.c:494: Test failed: 7 - lc_names[4] = (null), expected L"hu"
msvcr120.c:494: Test failed: 8 - lc_names[3] = (null), expected L"is"
msvcr120.c:494: Test failed: 8 - lc_names[4] = (null), expected L"is"
msvcr120.c:494: Test failed: 9 - lc_names[3] = (null), expected L"ja"
msvcr120.c:494: Test failed: 9 - lc_names[4] = (null), expected L"ja"
msvcr120.c:494: Test failed: 10 - lc_names[3] = (null), expected L"ko"
msvcr120.c:494: Test failed: 10 - lc_names[4] = (null), expected L"ko"
=== debian10 (64 bit WoW report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
msvcr120:
msvcr120.c:494: Test failed: 0 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 0 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 1 - lc_names[3] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 1 - lc_names[4] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 2 - lc_names[3] = (null), expected L"zh"
msvcr120.c:494: Test failed: 2 - lc_names[4] = (null), expected L"zh"
msvcr120.c:494: Test failed: 3 - lc_names[3] = (null), expected L"nl"
msvcr120.c:494: Test failed: 3 - lc_names[4] = (null), expected L"nl"
msvcr120.c:494: Test failed: 4 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 4 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 5 - lc_names[3] = (null), expected L"fr"
msvcr120.c:494: Test failed: 5 - lc_names[4] = (null), expected L"fr"
msvcr120.c:494: Test failed: 6 - lc_names[3] = (null), expected L"de"
msvcr120.c:494: Test failed: 6 - lc_names[4] = (null), expected L"de"
msvcr120.c:494: Test failed: 7 - lc_names[3] = (null), expected L"hu"
msvcr120.c:494: Test failed: 7 - lc_names[4] = (null), expected L"hu"
msvcr120.c:494: Test failed: 8 - lc_names[3] = (null), expected L"is"
msvcr120.c:494: Test failed: 8 - lc_names[4] = (null), expected L"is"
msvcr120.c:494: Test failed: 9 - lc_names[3] = (null), expected L"ja"
msvcr120.c:494: Test failed: 9 - lc_names[4] = (null), expected L"ja"
msvcr120.c:494: Test failed: 10 - lc_names[3] = (null), expected L"ko"
msvcr120.c:494: Test failed: 10 - lc_names[4] = (null), expected L"ko"
Jan. 31, 2020
Re: [PATCH v2 4/8] msvcrt: Share lconv data between threadlocinfo instances.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=64292
Your paranoid android.
=== debian10 (32 bit report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
msvcr120:
msvcr120.c:494: Test failed: 0 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 0 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 1 - lc_names[3] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 1 - lc_names[4] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 2 - lc_names[3] = (null), expected L"zh"
msvcr120.c:494: Test failed: 2 - lc_names[4] = (null), expected L"zh"
msvcr120.c:494: Test failed: 3 - lc_names[3] = (null), expected L"nl"
msvcr120.c:494: Test failed: 3 - lc_names[4] = (null), expected L"nl"
msvcr120.c:494: Test failed: 4 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 4 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 5 - lc_names[3] = (null), expected L"fr"
msvcr120.c:494: Test failed: 5 - lc_names[4] = (null), expected L"fr"
msvcr120.c:494: Test failed: 6 - lc_names[3] = (null), expected L"de"
msvcr120.c:494: Test failed: 6 - lc_names[4] = (null), expected L"de"
msvcr120.c:494: Test failed: 7 - lc_names[3] = (null), expected L"hu"
msvcr120.c:494: Test failed: 7 - lc_names[4] = (null), expected L"hu"
msvcr120.c:494: Test failed: 8 - lc_names[3] = (null), expected L"is"
msvcr120.c:494: Test failed: 8 - lc_names[4] = (null), expected L"is"
msvcr120.c:494: Test failed: 9 - lc_names[3] = (null), expected L"ja"
msvcr120.c:494: Test failed: 9 - lc_names[4] = (null), expected L"ja"
msvcr120.c:494: Test failed: 10 - lc_names[3] = (null), expected L"ko"
msvcr120.c:494: Test failed: 10 - lc_names[4] = (null), expected L"ko"
=== debian10 (32 bit Chinese:China report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
msvcr120:
msvcr120.c:494: Test failed: 0 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 0 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 1 - lc_names[3] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 1 - lc_names[4] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 2 - lc_names[3] = (null), expected L"zh"
msvcr120.c:494: Test failed: 2 - lc_names[4] = (null), expected L"zh"
msvcr120.c:494: Test failed: 3 - lc_names[3] = (null), expected L"nl"
msvcr120.c:494: Test failed: 3 - lc_names[4] = (null), expected L"nl"
msvcr120.c:494: Test failed: 4 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 4 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 5 - lc_names[3] = (null), expected L"fr"
msvcr120.c:494: Test failed: 5 - lc_names[4] = (null), expected L"fr"
msvcr120.c:494: Test failed: 6 - lc_names[3] = (null), expected L"de"
msvcr120.c:494: Test failed: 6 - lc_names[4] = (null), expected L"de"
msvcr120.c:494: Test failed: 7 - lc_names[3] = (null), expected L"hu"
msvcr120.c:494: Test failed: 7 - lc_names[4] = (null), expected L"hu"
msvcr120.c:494: Test failed: 8 - lc_names[3] = (null), expected L"is"
msvcr120.c:494: Test failed: 8 - lc_names[4] = (null), expected L"is"
msvcr120.c:494: Test failed: 9 - lc_names[3] = (null), expected L"ja"
msvcr120.c:494: Test failed: 9 - lc_names[4] = (null), expected L"ja"
msvcr120.c:494: Test failed: 10 - lc_names[3] = (null), expected L"ko"
msvcr120.c:494: Test failed: 10 - lc_names[4] = (null), expected L"ko"
=== debian10 (32 bit WoW report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
msvcr120:
msvcr120.c:494: Test failed: 0 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 0 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 1 - lc_names[3] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 1 - lc_names[4] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 2 - lc_names[3] = (null), expected L"zh"
msvcr120.c:494: Test failed: 2 - lc_names[4] = (null), expected L"zh"
msvcr120.c:494: Test failed: 3 - lc_names[3] = (null), expected L"nl"
msvcr120.c:494: Test failed: 3 - lc_names[4] = (null), expected L"nl"
msvcr120.c:494: Test failed: 4 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 4 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 5 - lc_names[3] = (null), expected L"fr"
msvcr120.c:494: Test failed: 5 - lc_names[4] = (null), expected L"fr"
msvcr120.c:494: Test failed: 6 - lc_names[3] = (null), expected L"de"
msvcr120.c:494: Test failed: 6 - lc_names[4] = (null), expected L"de"
msvcr120.c:494: Test failed: 7 - lc_names[3] = (null), expected L"hu"
msvcr120.c:494: Test failed: 7 - lc_names[4] = (null), expected L"hu"
msvcr120.c:494: Test failed: 8 - lc_names[3] = (null), expected L"is"
msvcr120.c:494: Test failed: 8 - lc_names[4] = (null), expected L"is"
msvcr120.c:494: Test failed: 9 - lc_names[3] = (null), expected L"ja"
msvcr120.c:494: Test failed: 9 - lc_names[4] = (null), expected L"ja"
msvcr120.c:494: Test failed: 10 - lc_names[3] = (null), expected L"ko"
msvcr120.c:494: Test failed: 10 - lc_names[4] = (null), expected L"ko"
=== debian10 (64 bit WoW report) ===
msvcr110:
msvcr110.c:108: Test failed: expected en-US, got en-us
msvcr110.c:108: Test failed: expected EN-US, got en-us
msvcr120:
msvcr120.c:494: Test failed: 0 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 0 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 1 - lc_names[3] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 1 - lc_names[4] = (null), expected L"nl-BE"
msvcr120.c:494: Test failed: 2 - lc_names[3] = (null), expected L"zh"
msvcr120.c:494: Test failed: 2 - lc_names[4] = (null), expected L"zh"
msvcr120.c:494: Test failed: 3 - lc_names[3] = (null), expected L"nl"
msvcr120.c:494: Test failed: 3 - lc_names[4] = (null), expected L"nl"
msvcr120.c:494: Test failed: 4 - lc_names[3] = (null), expected L"en"
msvcr120.c:494: Test failed: 4 - lc_names[4] = (null), expected L"en"
msvcr120.c:494: Test failed: 5 - lc_names[3] = (null), expected L"fr"
msvcr120.c:494: Test failed: 5 - lc_names[4] = (null), expected L"fr"
msvcr120.c:494: Test failed: 6 - lc_names[3] = (null), expected L"de"
msvcr120.c:494: Test failed: 6 - lc_names[4] = (null), expected L"de"
msvcr120.c:494: Test failed: 7 - lc_names[3] = (null), expected L"hu"
msvcr120.c:494: Test failed: 7 - lc_names[4] = (null), expected L"hu"
msvcr120.c:494: Test failed: 8 - lc_names[3] = (null), expected L"is"
msvcr120.c:494: Test failed: 8 - lc_names[4] = (null), expected L"is"
msvcr120.c:494: Test failed: 9 - lc_names[3] = (null), expected L"ja"
msvcr120.c:494: Test failed: 9 - lc_names[4] = (null), expected L"ja"
msvcr120.c:494: Test failed: 10 - lc_names[3] = (null), expected L"ko"
msvcr120.c:494: Test failed: 10 - lc_names[4] = (null), expected L"ko"
Jan. 31, 2020
[PATCH v2 8/8] msvcrt: Increment refcounts for all locale data in _get_current_locale().
by Chip Davis
Signed-off-by: Chip Davis <cdavis(a)codeweavers.com>
---
v2: Fix build.
---
dlls/msvcr90/tests/msvcr90.c | 44 ++++++++++++++++++------------------
dlls/msvcrt/locale.c | 24 ++++++++++++++++++--
2 files changed, 44 insertions(+), 24 deletions(-)
diff --git a/dlls/msvcr90/tests/msvcr90.c b/dlls/msvcr90/tests/msvcr90.c
index ec183d9be173..52e135d1e011 100644
--- a/dlls/msvcr90/tests/msvcr90.c
+++ b/dlls/msvcr90/tests/msvcr90.c
@@ -2021,14 +2021,14 @@ static void test__get_current_locale(void)
"same refcount pointers for LC_COLLATE\n");
ok(*l->locinfo->lc_category[LC_COLLATE].refcount == 1, "refcount = %d\n",
*l->locinfo->lc_category[LC_COLLATE].refcount);
- todo_wine ok(*l2->locinfo->lc_category[LC_COLLATE].refcount == 2, "refcount = %d\n",
+ ok(*l2->locinfo->lc_category[LC_COLLATE].refcount == 2, "refcount = %d\n",
*l2->locinfo->lc_category[LC_COLLATE].refcount);
for(i = LC_CTYPE; i <= LC_MAX; i++) {
ok(l->locinfo->lc_category[i].locale == l2->locinfo->lc_category[i].locale,
"different locale name pointers for category %d\n", i);
ok(l->locinfo->lc_category[i].refcount == l2->locinfo->lc_category[i].refcount,
"different refcount pointers for category %d\n", i);
- todo_wine ok(*l->locinfo->lc_category[i].refcount == 3, "refcount = %d for category %d\n",
+ ok(*l->locinfo->lc_category[i].refcount == 3, "refcount = %d for category %d\n",
*l->locinfo->lc_category[i].refcount, i);
}
@@ -2045,23 +2045,23 @@ static void test__get_current_locale(void)
ok(l->locinfo->pclmap == l2->locinfo->pclmap, "different clmap pointers\n");
ok(l->locinfo->pcumap == l2->locinfo->pcumap, "different cumap pointers\n");
ok(l->locinfo->ctype1_refcount == l2->locinfo->ctype1_refcount, "different ctype1_refcount pointers\n");
- todo_wine ok(*l->locinfo->ctype1_refcount == 3, "refcount = %d\n", *l->locinfo->ctype1_refcount);
+ ok(*l->locinfo->ctype1_refcount == 3, "refcount = %d\n", *l->locinfo->ctype1_refcount);
ok(l->locinfo->lconv == l2->locinfo->lconv, "different lconv pointers\n");
ok(l->locinfo->lconv_intl_refcount == l2->locinfo->lconv_intl_refcount, "different lconv_intl_refcount pointers\n");
- todo_wine ok(*l->locinfo->lconv_intl_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_intl_refcount);
+ ok(*l->locinfo->lconv_intl_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_intl_refcount);
ok(l->locinfo->lconv->decimal_point == l2->locinfo->lconv->decimal_point, "different LC_NUMERIC pointers\n");
ok(l->locinfo->lconv_num_refcount == l2->locinfo->lconv_num_refcount, "different lconv_num_refcount pointers\n");
- todo_wine ok(*l->locinfo->lconv_num_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_num_refcount);
+ ok(*l->locinfo->lconv_num_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_num_refcount);
ok(l->locinfo->lconv->currency_symbol == l2->locinfo->lconv->currency_symbol, "different LC_MONETARY pointers\n");
ok(l->locinfo->lconv_mon_refcount == l2->locinfo->lconv_mon_refcount, "different lconv_mon_refcount pointers\n");
- todo_wine ok(*l->locinfo->lconv_mon_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_mon_refcount);
+ ok(*l->locinfo->lconv_mon_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_mon_refcount);
ok(l->locinfo->lc_time_curr == l2->locinfo->lc_time_curr, "different lc_time_curr pointers\n");
ok(l->locinfo->lc_time_curr->unk == 1, "unk = %d\n", l->locinfo->lc_time_curr->unk);
- todo_wine ok(l->locinfo->lc_time_curr->refcount == 3, "refcount = %d\n", l->locinfo->lc_time_curr->refcount);
+ ok(l->locinfo->lc_time_curr->refcount == 3, "refcount = %d\n", l->locinfo->lc_time_curr->refcount);
p__free_locale(l2);
@@ -2078,7 +2078,7 @@ static void test__get_current_locale(void)
"same refcount pointers for category %d\n", i);
ok(*l->locinfo->lc_category[i].refcount == 1, "refcount = %d for category %d\n",
*l->locinfo->lc_category[i].refcount, i);
- todo_wine ok(*l2->locinfo->lc_category[i].refcount == 2, "refcount = %d for category %d\n",
+ ok(*l2->locinfo->lc_category[i].refcount == 2, "refcount = %d for category %d\n",
*l2->locinfo->lc_category[i].refcount, i);
}
for(i = LC_MONETARY; i <= LC_MAX; i++) {
@@ -2086,7 +2086,7 @@ static void test__get_current_locale(void)
"different locale name pointers for category %d\n", i);
ok(l->locinfo->lc_category[i].refcount == l2->locinfo->lc_category[i].refcount,
"different refcount pointers for category %d\n", i);
- todo_wine ok(*l->locinfo->lc_category[i].refcount == 3, "refcount = %d for category %d\n",
+ ok(*l->locinfo->lc_category[i].refcount == 3, "refcount = %d for category %d\n",
*l->locinfo->lc_category[i].refcount, i);
}
@@ -2108,19 +2108,19 @@ static void test__get_current_locale(void)
ok(l->locinfo->lconv == l2->locinfo->lconv, "different lconv pointers\n");
ok(l->locinfo->lconv_intl_refcount == l2->locinfo->lconv_intl_refcount, "different lconv_intl_refcount pointers\n");
- todo_wine ok(*l->locinfo->lconv_intl_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_intl_refcount);
+ ok(*l->locinfo->lconv_intl_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_intl_refcount);
ok(l->locinfo->lconv->decimal_point == l2->locinfo->lconv->decimal_point, "different LC_NUMERIC pointers\n");
ok(l->locinfo->lconv_num_refcount == l2->locinfo->lconv_num_refcount, "different lconv_num_refcount pointers\n");
- todo_wine ok(*l->locinfo->lconv_num_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_num_refcount);
+ ok(*l->locinfo->lconv_num_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_num_refcount);
ok(l->locinfo->lconv->currency_symbol == l2->locinfo->lconv->currency_symbol, "different LC_MONETARY pointers\n");
ok(l->locinfo->lconv_mon_refcount == l2->locinfo->lconv_mon_refcount, "different lconv_mon_refcount pointers\n");
- todo_wine ok(*l->locinfo->lconv_mon_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_mon_refcount);
+ ok(*l->locinfo->lconv_mon_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_mon_refcount);
ok(l->locinfo->lc_time_curr == l2->locinfo->lc_time_curr, "different lc_time_curr pointers\n");
ok(l->locinfo->lc_time_curr->unk == 1, "unk = %d\n", l->locinfo->lc_time_curr->unk);
- todo_wine ok(l->locinfo->lc_time_curr->refcount == 3, "refcount = %d\n", l->locinfo->lc_time_curr->refcount);
+ ok(l->locinfo->lc_time_curr->refcount == 3, "refcount = %d\n", l->locinfo->lc_time_curr->refcount);
p__free_locale(l2);
@@ -2137,7 +2137,7 @@ static void test__get_current_locale(void)
"same refcount pointers for category %d\n", i);
ok(*l->locinfo->lc_category[i].refcount == 1, "refcount = %d for category %d\n",
*l->locinfo->lc_category[i].refcount, i);
- todo_wine ok(*l2->locinfo->lc_category[i].refcount == 2, "refcount = %d for category %d\n",
+ ok(*l2->locinfo->lc_category[i].refcount == 2, "refcount = %d for category %d\n",
*l2->locinfo->lc_category[i].refcount, i);
}
for(i = LC_NUMERIC; i <= LC_MAX; i++) {
@@ -2145,7 +2145,7 @@ static void test__get_current_locale(void)
"different locale name pointers for category %d\n", i);
ok(l->locinfo->lc_category[i].refcount == l2->locinfo->lc_category[i].refcount,
"different refcount pointers for category %d\n", i);
- todo_wine ok(*l->locinfo->lc_category[i].refcount == 3, "refcount = %d for category %d\n",
+ ok(*l->locinfo->lc_category[i].refcount == 3, "refcount = %d for category %d\n",
*l->locinfo->lc_category[i].refcount, i);
}
@@ -2168,11 +2168,11 @@ static void test__get_current_locale(void)
ok(l->locinfo->lconv != l2->locinfo->lconv, "same lconv pointers\n");
ok(l->locinfo->lconv_intl_refcount != l2->locinfo->lconv_intl_refcount, "same lconv_intl_refcount pointers\n");
ok(*l->locinfo->lconv_intl_refcount == 1, "refcount = %d\n", *l->locinfo->lconv_intl_refcount);
- todo_wine ok(*l2->locinfo->lconv_intl_refcount == 2, "refcount = %d\n", *l2->locinfo->lconv_intl_refcount);
+ ok(*l2->locinfo->lconv_intl_refcount == 2, "refcount = %d\n", *l2->locinfo->lconv_intl_refcount);
ok(l->locinfo->lconv->decimal_point == l2->locinfo->lconv->decimal_point, "different LC_NUMERIC pointers\n");
ok(l->locinfo->lconv_num_refcount == l2->locinfo->lconv_num_refcount, "different lconv_num_refcount pointers\n");
- todo_wine ok(*l->locinfo->lconv_num_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_num_refcount);
+ ok(*l->locinfo->lconv_num_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_num_refcount);
ok(l->locinfo->lconv->currency_symbol != l2->locinfo->lconv->currency_symbol, "same LC_MONETARY pointers\n");
ok(l->locinfo->lconv_mon_refcount != l2->locinfo->lconv_mon_refcount, "same lconv_mon_refcount pointers\n");
@@ -2181,7 +2181,7 @@ static void test__get_current_locale(void)
ok(l->locinfo->lc_time_curr == l2->locinfo->lc_time_curr, "different lc_time_curr pointers\n");
ok(l->locinfo->lc_time_curr->unk == 1, "unk = %d\n", l->locinfo->lc_time_curr->unk);
- todo_wine ok(l->locinfo->lc_time_curr->refcount == 3, "refcount = %d\n", l->locinfo->lc_time_curr->refcount);
+ ok(l->locinfo->lc_time_curr->refcount == 3, "refcount = %d\n", l->locinfo->lc_time_curr->refcount);
p__free_locale(l2);
@@ -2198,14 +2198,14 @@ static void test__get_current_locale(void)
"same refcount pointers for category %d\n", i);
ok(*l->locinfo->lc_category[i].refcount == 1, "refcount = %d for category %d\n",
*l->locinfo->lc_category[i].refcount, i);
- todo_wine ok(*l2->locinfo->lc_category[i].refcount == 2, "refcount = %d for category %d\n",
+ ok(*l2->locinfo->lc_category[i].refcount == 2, "refcount = %d for category %d\n",
*l2->locinfo->lc_category[i].refcount, i);
}
ok(l->locinfo->lc_category[LC_TIME].locale == l2->locinfo->lc_category[LC_TIME].locale,
"different locale name pointers for LC_TIME\n");
ok(l->locinfo->lc_category[LC_TIME].refcount == l2->locinfo->lc_category[LC_TIME].refcount,
"different refcount pointers for LC_TIME\n");
- todo_wine ok(*l->locinfo->lc_category[LC_TIME].refcount == 3, "refcount = %d\n",
+ ok(*l->locinfo->lc_category[LC_TIME].refcount == 3, "refcount = %d\n",
*l->locinfo->lc_category[LC_TIME].refcount);
ok(l->locinfo->lc_collate_cp != l2->locinfo->lc_collate_cp, "same lc_collate_cp %u, %u\n",
@@ -2241,7 +2241,7 @@ static void test__get_current_locale(void)
ok(l->locinfo->lc_time_curr == l2->locinfo->lc_time_curr, "different lc_time_curr pointers\n");
ok(l->locinfo->lc_time_curr->unk == 1, "unk = %d\n", l->locinfo->lc_time_curr->unk);
- todo_wine ok(l->locinfo->lc_time_curr->refcount == 3, "refcount = %d\n", l->locinfo->lc_time_curr->refcount);
+ ok(l->locinfo->lc_time_curr->refcount == 3, "refcount = %d\n", l->locinfo->lc_time_curr->refcount);
p__free_locale(l2);
@@ -2258,7 +2258,7 @@ static void test__get_current_locale(void)
"same refcount pointers for category %d\n", i);
ok(*l->locinfo->lc_category[i].refcount == 1, "refcount = %d for category %d\n",
*l->locinfo->lc_category[i].refcount, i);
- todo_wine ok(*l2->locinfo->lc_category[i].refcount == 2, "refcount = %d for category %d\n",
+ ok(*l2->locinfo->lc_category[i].refcount == 2, "refcount = %d for category %d\n",
*l2->locinfo->lc_category[i].refcount, i);
}
diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c
index 6210039eca16..4d7ef6663b67 100644
--- a/dlls/msvcrt/locale.c
+++ b/dlls/msvcrt/locale.c
@@ -915,6 +915,27 @@ int CDECL ___lc_collate_cp_func(void)
return get_locinfo()->lc_collate_cp;
}
+/* INTERNAL: increases all reference counts in threadlocinfo struct */
+MSVCRT_pthreadlocinfo grab_locinfo(MSVCRT_pthreadlocinfo locinfo)
+{
+ int i;
+
+ InterlockedIncrement(&locinfo->refcount);
+ for(i=MSVCRT_LC_MIN+1; i<=MSVCRT_LC_MAX; i++)
+ InterlockedIncrement(locinfo->lc_category[i].refcount);
+ if(locinfo->lconv_intl_refcount)
+ InterlockedIncrement(locinfo->lconv_intl_refcount);
+ if(locinfo->lconv_num_refcount)
+ InterlockedIncrement(locinfo->lconv_num_refcount);
+ if(locinfo->lconv_mon_refcount)
+ InterlockedIncrement(locinfo->lconv_mon_refcount);
+ if(locinfo->ctype1_refcount)
+ InterlockedIncrement(locinfo->ctype1_refcount);
+ InterlockedIncrement(&locinfo->lc_time_curr->refcount);
+
+ return locinfo;
+}
+
/* INTERNAL: frees MSVCRT_pthreadlocinfo struct */
void free_locinfo(MSVCRT_pthreadlocinfo locinfo)
{
@@ -1009,9 +1030,8 @@ MSVCRT__locale_t CDECL MSVCRT__get_current_locale(void)
if(!loc)
return NULL;
- loc->locinfo = get_locinfo();
+ loc->locinfo = grab_locinfo(get_locinfo());
loc->mbcinfo = get_mbcinfo();
- InterlockedIncrement(&loc->locinfo->refcount);
InterlockedIncrement(&loc->mbcinfo->refcount);
return loc;
}
--
2.24.0
Jan. 31, 2020
[PATCH v2 7/8] msvcrt: Swap the threadlocinfo pointers in setlocale().
by Chip Davis
Do this instead of swapping their contents. This way, the result of
_get_current_locale(), which references the current threadlocinfo, won't
change after a setlocale() call.
Signed-off-by: Chip Davis <cdavis(a)codeweavers.com>
---
v2: Update for changes to previous patches.
---
dlls/msvcr90/tests/msvcr90.c | 334 +++++++++++++----------------------
dlls/msvcrt/locale.c | 196 ++------------------
2 files changed, 132 insertions(+), 398 deletions(-)
diff --git a/dlls/msvcr90/tests/msvcr90.c b/dlls/msvcr90/tests/msvcr90.c
index 664ab49317a9..ec183d9be173 100644
--- a/dlls/msvcr90/tests/msvcr90.c
+++ b/dlls/msvcr90/tests/msvcr90.c
@@ -1994,16 +1994,14 @@ static void test__get_current_locale(void)
ok(l->locinfo->refcount == 3, "refcount = %d\n", l->locinfo->refcount);
p_setlocale(LC_ALL, "english");
- todo_wine {
- lc_str(LC_COLLATE, "C");
- lc_str(LC_CTYPE, "C");
- lc_str(LC_MONETARY, "C");
- lc_str(LC_NUMERIC, "C");
- lc_str(LC_TIME, "C");
- }
+ lc_str(LC_COLLATE, "C");
+ lc_str(LC_CTYPE, "C");
+ lc_str(LC_MONETARY, "C");
+ lc_str(LC_NUMERIC, "C");
+ lc_str(LC_TIME, "C");
#undef lc_str
- todo_wine ok(l->locinfo->refcount == 2, "refcount = %d\n", l->locinfo->refcount);
+ ok(l->locinfo->refcount == 2, "refcount = %d\n", l->locinfo->refcount);
ok(l->locinfo == l2->locinfo, "different locinfo pointers\n");
ok(l->mbcinfo == l2->mbcinfo, "different mbcinfo pointers\n");
@@ -2014,17 +2012,13 @@ static void test__get_current_locale(void)
p_setlocale(LC_COLLATE, "C");
l2 = p__get_current_locale();
- todo_wine {
- ok(l->locinfo->refcount == 1, "refcount = %d\n", l->locinfo->refcount);
- ok(l2->locinfo->refcount == 2, "refcount = %d\n", l2->locinfo->refcount);
- }
+ ok(l->locinfo->refcount == 1, "refcount = %d\n", l->locinfo->refcount);
+ ok(l2->locinfo->refcount == 2, "refcount = %d\n", l2->locinfo->refcount);
- todo_wine {
- ok(l->locinfo->lc_category[LC_COLLATE].locale != l2->locinfo->lc_category[LC_COLLATE].locale,
- "same locale name pointers for LC_COLLATE\n");
- ok(l->locinfo->lc_category[LC_COLLATE].refcount != l2->locinfo->lc_category[LC_COLLATE].refcount,
- "same refcount pointers for LC_COLLATE\n");
- }
+ ok(l->locinfo->lc_category[LC_COLLATE].locale != l2->locinfo->lc_category[LC_COLLATE].locale,
+ "same locale name pointers for LC_COLLATE\n");
+ ok(l->locinfo->lc_category[LC_COLLATE].refcount != l2->locinfo->lc_category[LC_COLLATE].refcount,
+ "same refcount pointers for LC_COLLATE\n");
ok(*l->locinfo->lc_category[LC_COLLATE].refcount == 1, "refcount = %d\n",
*l->locinfo->lc_category[LC_COLLATE].refcount);
todo_wine ok(*l2->locinfo->lc_category[LC_COLLATE].refcount == 2, "refcount = %d\n",
@@ -2038,7 +2032,7 @@ static void test__get_current_locale(void)
*l->locinfo->lc_category[i].refcount, i);
}
- todo_wine ok(l->locinfo->lc_collate_cp != l2->locinfo->lc_collate_cp, "same lc_collate_cp %u, %u\n",
+ ok(l->locinfo->lc_collate_cp != l2->locinfo->lc_collate_cp, "same lc_collate_cp %u, %u\n",
l->locinfo->lc_collate_cp, l2->locinfo->lc_collate_cp);
ok(l->locinfo->lc_codepage == l2->locinfo->lc_codepage, "different lc_codepages %u, %u\n",
@@ -2055,21 +2049,15 @@ static void test__get_current_locale(void)
ok(l->locinfo->lconv == l2->locinfo->lconv, "different lconv pointers\n");
ok(l->locinfo->lconv_intl_refcount == l2->locinfo->lconv_intl_refcount, "different lconv_intl_refcount pointers\n");
- todo_wine ok(l->locinfo->lconv_intl_refcount, "null refcount pointer in non-C locale\n");
- if(l->locinfo->lconv_intl_refcount)
- todo_wine ok(*l->locinfo->lconv_intl_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_intl_refcount);
+ todo_wine ok(*l->locinfo->lconv_intl_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_intl_refcount);
ok(l->locinfo->lconv->decimal_point == l2->locinfo->lconv->decimal_point, "different LC_NUMERIC pointers\n");
ok(l->locinfo->lconv_num_refcount == l2->locinfo->lconv_num_refcount, "different lconv_num_refcount pointers\n");
- todo_wine ok(l->locinfo->lconv_num_refcount, "null refcount pointer in non-C locale\n");
- if(l->locinfo->lconv_num_refcount)
- todo_wine ok(*l->locinfo->lconv_num_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_num_refcount);
+ todo_wine ok(*l->locinfo->lconv_num_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_num_refcount);
ok(l->locinfo->lconv->currency_symbol == l2->locinfo->lconv->currency_symbol, "different LC_MONETARY pointers\n");
ok(l->locinfo->lconv_mon_refcount == l2->locinfo->lconv_mon_refcount, "different lconv_mon_refcount pointers\n");
- todo_wine ok(l->locinfo->lconv_mon_refcount, "null refcount pointer in non-C locale\n");
- if(l->locinfo->lconv_mon_refcount)
- todo_wine ok(*l->locinfo->lconv_mon_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_mon_refcount);
+ todo_wine ok(*l->locinfo->lconv_mon_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_mon_refcount);
ok(l->locinfo->lc_time_curr == l2->locinfo->lc_time_curr, "different lc_time_curr pointers\n");
ok(l->locinfo->lc_time_curr->unk == 1, "unk = %d\n", l->locinfo->lc_time_curr->unk);
@@ -2080,18 +2068,14 @@ static void test__get_current_locale(void)
p_setlocale(LC_CTYPE, "C");
l2 = p__get_current_locale();
- todo_wine {
- ok(l->locinfo->refcount == 1, "refcount = %d\n", l->locinfo->refcount);
- ok(l2->locinfo->refcount == 2, "refcount = %d\n", l2->locinfo->refcount);
- }
+ ok(l->locinfo->refcount == 1, "refcount = %d\n", l->locinfo->refcount);
+ ok(l2->locinfo->refcount == 2, "refcount = %d\n", l2->locinfo->refcount);
for(i = LC_COLLATE; i < LC_MONETARY; i++) {
- todo_wine {
- ok(l->locinfo->lc_category[i].locale != l2->locinfo->lc_category[i].locale,
- "same locale name pointers for category %d\n", i);
- ok(l->locinfo->lc_category[i].refcount != l2->locinfo->lc_category[i].refcount,
- "same refcount pointers for category %d\n", i);
- }
+ ok(l->locinfo->lc_category[i].locale != l2->locinfo->lc_category[i].locale,
+ "same locale name pointers for category %d\n", i);
+ ok(l->locinfo->lc_category[i].refcount != l2->locinfo->lc_category[i].refcount,
+ "same refcount pointers for category %d\n", i);
ok(*l->locinfo->lc_category[i].refcount == 1, "refcount = %d for category %d\n",
*l->locinfo->lc_category[i].refcount, i);
todo_wine ok(*l2->locinfo->lc_category[i].refcount == 2, "refcount = %d for category %d\n",
@@ -2106,45 +2090,33 @@ static void test__get_current_locale(void)
*l->locinfo->lc_category[i].refcount, i);
}
- todo_wine {
- ok(l->locinfo->lc_collate_cp != l2->locinfo->lc_collate_cp, "same lc_collate_cp %u, %u\n",
- l->locinfo->lc_collate_cp, l2->locinfo->lc_collate_cp);
+ ok(l->locinfo->lc_collate_cp != l2->locinfo->lc_collate_cp, "same lc_collate_cp %u, %u\n",
+ l->locinfo->lc_collate_cp, l2->locinfo->lc_collate_cp);
- ok(l->locinfo->lc_codepage != l2->locinfo->lc_codepage, "same lc_codepages %u, %u\n",
- l->locinfo->lc_codepage, l2->locinfo->lc_codepage);
- ok(l->locinfo->lc_clike != l2->locinfo->lc_clike, "same lc_clike values %d, %d\n",
- l->locinfo->lc_clike, l2->locinfo->lc_clike);
- ok(l->locinfo->lc_clike, "non-C locale is C-like\n");
- }
+ ok(l->locinfo->lc_codepage != l2->locinfo->lc_codepage, "same lc_codepages %u, %u\n",
+ l->locinfo->lc_codepage, l2->locinfo->lc_codepage);
+ ok(l->locinfo->lc_clike != l2->locinfo->lc_clike, "same lc_clike values %d, %d\n",
+ l->locinfo->lc_clike, l2->locinfo->lc_clike);
+ ok(l->locinfo->lc_clike, "non-C locale is C-like\n");
ok(!l2->locinfo->lc_clike, "C locale is not C-like\n");
- todo_wine {
- ok(l->locinfo->ctype1 != l2->locinfo->ctype1, "same ctype1 pointers\n");
- ok(l->locinfo->pclmap != l2->locinfo->pclmap, "same clmap pointers\n");
- ok(l->locinfo->pcumap != l2->locinfo->pcumap, "same cumap pointers\n");
- ok(l->locinfo->ctype1_refcount != l2->locinfo->ctype1_refcount, "same ctype1_refcount pointers\n");
- ok(l->locinfo->ctype1_refcount, "null refcount pointer for non-C locale\n");
- if(l->locinfo->ctype1_refcount)
- ok(*l->locinfo->ctype1_refcount == 1, "refcount = %d\n", *l->locinfo->ctype1_refcount);
- }
+ ok(l->locinfo->ctype1 != l2->locinfo->ctype1, "same ctype1 pointers\n");
+ ok(l->locinfo->pclmap != l2->locinfo->pclmap, "same clmap pointers\n");
+ ok(l->locinfo->pcumap != l2->locinfo->pcumap, "same cumap pointers\n");
+ ok(l->locinfo->ctype1_refcount != l2->locinfo->ctype1_refcount, "same ctype1_refcount pointers\n");
+ ok(*l->locinfo->ctype1_refcount == 1, "refcount = %d\n", *l->locinfo->ctype1_refcount);
ok(!l2->locinfo->ctype1_refcount, "nonnull refcount pointer for C locale\n");
ok(l->locinfo->lconv == l2->locinfo->lconv, "different lconv pointers\n");
ok(l->locinfo->lconv_intl_refcount == l2->locinfo->lconv_intl_refcount, "different lconv_intl_refcount pointers\n");
- todo_wine ok(l->locinfo->lconv_intl_refcount, "null refcount pointer in non-C locale\n");
- if(l->locinfo->lconv_intl_refcount)
- todo_wine ok(*l->locinfo->lconv_intl_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_intl_refcount);
+ todo_wine ok(*l->locinfo->lconv_intl_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_intl_refcount);
ok(l->locinfo->lconv->decimal_point == l2->locinfo->lconv->decimal_point, "different LC_NUMERIC pointers\n");
ok(l->locinfo->lconv_num_refcount == l2->locinfo->lconv_num_refcount, "different lconv_num_refcount pointers\n");
- todo_wine ok(l->locinfo->lconv_num_refcount, "null refcount pointer in non-C locale\n");
- if(l->locinfo->lconv_num_refcount)
- todo_wine ok(*l->locinfo->lconv_num_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_num_refcount);
+ todo_wine ok(*l->locinfo->lconv_num_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_num_refcount);
ok(l->locinfo->lconv->currency_symbol == l2->locinfo->lconv->currency_symbol, "different LC_MONETARY pointers\n");
ok(l->locinfo->lconv_mon_refcount == l2->locinfo->lconv_mon_refcount, "different lconv_mon_refcount pointers\n");
- todo_wine ok(l->locinfo->lconv_mon_refcount, "null refcount pointer in non-C locale\n");
- if(l->locinfo->lconv_mon_refcount)
- todo_wine ok(*l->locinfo->lconv_mon_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_mon_refcount);
+ todo_wine ok(*l->locinfo->lconv_mon_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_mon_refcount);
ok(l->locinfo->lc_time_curr == l2->locinfo->lc_time_curr, "different lc_time_curr pointers\n");
ok(l->locinfo->lc_time_curr->unk == 1, "unk = %d\n", l->locinfo->lc_time_curr->unk);
@@ -2155,18 +2127,14 @@ static void test__get_current_locale(void)
p_setlocale(LC_MONETARY, "C");
l2 = p__get_current_locale();
- todo_wine {
- ok(l->locinfo->refcount == 1, "refcount = %d\n", l->locinfo->refcount);
- ok(l2->locinfo->refcount == 2, "refcount = %d\n", l2->locinfo->refcount);
- }
+ ok(l->locinfo->refcount == 1, "refcount = %d\n", l->locinfo->refcount);
+ ok(l2->locinfo->refcount == 2, "refcount = %d\n", l2->locinfo->refcount);
for(i = LC_COLLATE; i <= LC_MONETARY; i++) {
- todo_wine {
- ok(l->locinfo->lc_category[i].locale != l2->locinfo->lc_category[i].locale,
- "same locale name pointers for category %d\n", i);
- ok(l->locinfo->lc_category[i].refcount != l2->locinfo->lc_category[i].refcount,
- "same refcount pointers for category %d\n", i);
- }
+ ok(l->locinfo->lc_category[i].locale != l2->locinfo->lc_category[i].locale,
+ "same locale name pointers for category %d\n", i);
+ ok(l->locinfo->lc_category[i].refcount != l2->locinfo->lc_category[i].refcount,
+ "same refcount pointers for category %d\n", i);
ok(*l->locinfo->lc_category[i].refcount == 1, "refcount = %d for category %d\n",
*l->locinfo->lc_category[i].refcount, i);
todo_wine ok(*l2->locinfo->lc_category[i].refcount == 2, "refcount = %d for category %d\n",
@@ -2181,52 +2149,34 @@ static void test__get_current_locale(void)
*l->locinfo->lc_category[i].refcount, i);
}
- todo_wine {
- ok(l->locinfo->lc_collate_cp != l2->locinfo->lc_collate_cp, "same lc_collate_cp %u, %u\n",
- l->locinfo->lc_collate_cp, l2->locinfo->lc_collate_cp);
+ ok(l->locinfo->lc_collate_cp != l2->locinfo->lc_collate_cp, "same lc_collate_cp %u, %u\n",
+ l->locinfo->lc_collate_cp, l2->locinfo->lc_collate_cp);
- ok(l->locinfo->lc_codepage != l2->locinfo->lc_codepage, "same lc_codepages %u, %u\n",
- l->locinfo->lc_codepage, l2->locinfo->lc_codepage);
- ok(l->locinfo->lc_clike != l2->locinfo->lc_clike, "same lc_clike values %d, %d\n",
- l->locinfo->lc_clike, l2->locinfo->lc_clike);
- ok(l->locinfo->lc_clike, "non-C locale is C-like\n");
- }
+ ok(l->locinfo->lc_codepage != l2->locinfo->lc_codepage, "same lc_codepages %u, %u\n",
+ l->locinfo->lc_codepage, l2->locinfo->lc_codepage);
+ ok(l->locinfo->lc_clike != l2->locinfo->lc_clike, "same lc_clike values %d, %d\n",
+ l->locinfo->lc_clike, l2->locinfo->lc_clike);
+ ok(l->locinfo->lc_clike, "non-C locale is C-like\n");
ok(!l2->locinfo->lc_clike, "C locale is not C-like\n");
- todo_wine {
- ok(l->locinfo->ctype1 != l2->locinfo->ctype1, "same ctype1 pointers\n");
- ok(l->locinfo->pclmap != l2->locinfo->pclmap, "same clmap pointers\n");
- ok(l->locinfo->pcumap != l2->locinfo->pcumap, "same cumap pointers\n");
- ok(l->locinfo->ctype1_refcount != l2->locinfo->ctype1_refcount, "same ctype1_refcount pointers\n");
- ok(l->locinfo->ctype1_refcount, "null refcount pointer for non-C locale\n");
- if(l->locinfo->ctype1_refcount)
- ok(*l->locinfo->ctype1_refcount == 1, "refcount = %d\n", *l->locinfo->ctype1_refcount);
- }
+ ok(l->locinfo->ctype1 != l2->locinfo->ctype1, "same ctype1 pointers\n");
+ ok(l->locinfo->pclmap != l2->locinfo->pclmap, "same clmap pointers\n");
+ ok(l->locinfo->pcumap != l2->locinfo->pcumap, "same cumap pointers\n");
+ ok(l->locinfo->ctype1_refcount != l2->locinfo->ctype1_refcount, "same ctype1_refcount pointers\n");
+ ok(*l->locinfo->ctype1_refcount == 1, "refcount = %d\n", *l->locinfo->ctype1_refcount);
ok(!l2->locinfo->ctype1_refcount, "nonnull refcount pointer for C locale\n");
- todo_wine {
- ok(l->locinfo->lconv != l2->locinfo->lconv, "same lconv pointers\n");
- ok(l->locinfo->lconv_intl_refcount != l2->locinfo->lconv_intl_refcount, "same lconv_intl_refcount pointers\n");
- ok(l->locinfo->lconv_intl_refcount, "null refcount pointer in non-C locale\n");
- if(l->locinfo->lconv_intl_refcount)
- ok(*l->locinfo->lconv_intl_refcount == 1, "refcount = %d\n", *l->locinfo->lconv_intl_refcount);
- ok(l2->locinfo->lconv_intl_refcount, "null refcount pointer for C locale\n");
- if(l2->locinfo->lconv_intl_refcount)
- ok(*l2->locinfo->lconv_intl_refcount == 2, "refcount = %d\n", *l2->locinfo->lconv_intl_refcount);
- }
+ ok(l->locinfo->lconv != l2->locinfo->lconv, "same lconv pointers\n");
+ ok(l->locinfo->lconv_intl_refcount != l2->locinfo->lconv_intl_refcount, "same lconv_intl_refcount pointers\n");
+ ok(*l->locinfo->lconv_intl_refcount == 1, "refcount = %d\n", *l->locinfo->lconv_intl_refcount);
+ todo_wine ok(*l2->locinfo->lconv_intl_refcount == 2, "refcount = %d\n", *l2->locinfo->lconv_intl_refcount);
ok(l->locinfo->lconv->decimal_point == l2->locinfo->lconv->decimal_point, "different LC_NUMERIC pointers\n");
ok(l->locinfo->lconv_num_refcount == l2->locinfo->lconv_num_refcount, "different lconv_num_refcount pointers\n");
- todo_wine ok(l->locinfo->lconv_num_refcount, "null refcount pointer in non-C locale\n");
- if(l->locinfo->lconv_num_refcount)
- todo_wine ok(*l->locinfo->lconv_num_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_num_refcount);
-
- todo_wine {
- ok(l->locinfo->lconv->currency_symbol != l2->locinfo->lconv->currency_symbol, "same LC_MONETARY pointers\n");
- ok(l->locinfo->lconv_mon_refcount != l2->locinfo->lconv_mon_refcount, "same lconv_mon_refcount pointers\n");
- ok(l->locinfo->lconv_mon_refcount, "null refcount pointer in non-C locale\n");
- if(l->locinfo->lconv_mon_refcount)
- ok(*l->locinfo->lconv_mon_refcount == 1, "refcount = %d\n", *l->locinfo->lconv_mon_refcount);
- }
+ todo_wine ok(*l->locinfo->lconv_num_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_num_refcount);
+
+ ok(l->locinfo->lconv->currency_symbol != l2->locinfo->lconv->currency_symbol, "same LC_MONETARY pointers\n");
+ ok(l->locinfo->lconv_mon_refcount != l2->locinfo->lconv_mon_refcount, "same lconv_mon_refcount pointers\n");
+ ok(*l->locinfo->lconv_mon_refcount == 1, "refcount = %d\n", *l->locinfo->lconv_mon_refcount);
ok(!l2->locinfo->lconv_mon_refcount, "nonnull refcount pointer for C locale\n");
ok(l->locinfo->lc_time_curr == l2->locinfo->lc_time_curr, "different lc_time_curr pointers\n");
@@ -2238,18 +2188,14 @@ static void test__get_current_locale(void)
p_setlocale(LC_NUMERIC, "C");
l2 = p__get_current_locale();
- todo_wine {
- ok(l->locinfo->refcount == 1, "refcount = %d\n", l->locinfo->refcount);
- ok(l2->locinfo->refcount == 2, "refcount = %d\n", l2->locinfo->refcount);
- }
+ ok(l->locinfo->refcount == 1, "refcount = %d\n", l->locinfo->refcount);
+ ok(l2->locinfo->refcount == 2, "refcount = %d\n", l2->locinfo->refcount);
for(i = LC_COLLATE; i <= LC_NUMERIC; i++) {
- todo_wine {
- ok(l->locinfo->lc_category[i].locale != l2->locinfo->lc_category[i].locale,
- "same locale name pointers for category %d\n", i);
- ok(l->locinfo->lc_category[i].refcount != l2->locinfo->lc_category[i].refcount,
- "same refcount pointers for category %d\n", i);
- }
+ ok(l->locinfo->lc_category[i].locale != l2->locinfo->lc_category[i].locale,
+ "same locale name pointers for category %d\n", i);
+ ok(l->locinfo->lc_category[i].refcount != l2->locinfo->lc_category[i].refcount,
+ "same refcount pointers for category %d\n", i);
ok(*l->locinfo->lc_category[i].refcount == 1, "refcount = %d for category %d\n",
*l->locinfo->lc_category[i].refcount, i);
todo_wine ok(*l2->locinfo->lc_category[i].refcount == 2, "refcount = %d for category %d\n",
@@ -2262,53 +2208,35 @@ static void test__get_current_locale(void)
todo_wine ok(*l->locinfo->lc_category[LC_TIME].refcount == 3, "refcount = %d\n",
*l->locinfo->lc_category[LC_TIME].refcount);
- todo_wine {
- ok(l->locinfo->lc_collate_cp != l2->locinfo->lc_collate_cp, "same lc_collate_cp %u, %u\n",
- l->locinfo->lc_collate_cp, l2->locinfo->lc_collate_cp);
+ ok(l->locinfo->lc_collate_cp != l2->locinfo->lc_collate_cp, "same lc_collate_cp %u, %u\n",
+ l->locinfo->lc_collate_cp, l2->locinfo->lc_collate_cp);
- ok(l->locinfo->lc_codepage != l2->locinfo->lc_codepage, "same lc_codepages %u, %u\n",
- l->locinfo->lc_codepage, l2->locinfo->lc_codepage);
- ok(l->locinfo->lc_clike != l2->locinfo->lc_clike, "same lc_clike values %d, %d\n",
- l->locinfo->lc_clike, l2->locinfo->lc_clike);
- ok(l->locinfo->lc_clike, "non-C locale is C-like\n");
- }
+ ok(l->locinfo->lc_codepage != l2->locinfo->lc_codepage, "same lc_codepages %u, %u\n",
+ l->locinfo->lc_codepage, l2->locinfo->lc_codepage);
+ ok(l->locinfo->lc_clike != l2->locinfo->lc_clike, "same lc_clike values %d, %d\n",
+ l->locinfo->lc_clike, l2->locinfo->lc_clike);
+ ok(l->locinfo->lc_clike, "non-C locale is C-like\n");
ok(!l2->locinfo->lc_clike, "C locale is not C-like\n");
- todo_wine {
- ok(l->locinfo->ctype1 != l2->locinfo->ctype1, "same ctype1 pointers\n");
- ok(l->locinfo->pclmap != l2->locinfo->pclmap, "same clmap pointers\n");
- ok(l->locinfo->pcumap != l2->locinfo->pcumap, "same cumap pointers\n");
- ok(l->locinfo->ctype1_refcount != l2->locinfo->ctype1_refcount, "same ctype1_refcount pointers\n");
- ok(l->locinfo->ctype1_refcount, "null refcount pointer for non-C locale\n");
- if(l->locinfo->ctype1_refcount)
- ok(*l->locinfo->ctype1_refcount == 1, "refcount = %d\n", *l->locinfo->ctype1_refcount);
- }
+ ok(l->locinfo->ctype1 != l2->locinfo->ctype1, "same ctype1 pointers\n");
+ ok(l->locinfo->pclmap != l2->locinfo->pclmap, "same clmap pointers\n");
+ ok(l->locinfo->pcumap != l2->locinfo->pcumap, "same cumap pointers\n");
+ ok(l->locinfo->ctype1_refcount != l2->locinfo->ctype1_refcount, "same ctype1_refcount pointers\n");
+ ok(*l->locinfo->ctype1_refcount == 1, "refcount = %d\n", *l->locinfo->ctype1_refcount);
ok(!l2->locinfo->ctype1_refcount, "nonnull refcount pointer for C locale\n");
- todo_wine {
- ok(l->locinfo->lconv != l2->locinfo->lconv, "same lconv pointers\n");
- ok(l->locinfo->lconv_intl_refcount != l2->locinfo->lconv_intl_refcount, "same lconv_intl_refcount pointers\n");
- ok(l->locinfo->lconv_intl_refcount, "null refcount pointer in non-C locale\n");
- if(l->locinfo->lconv_intl_refcount)
- ok(*l->locinfo->lconv_intl_refcount == 1, "refcount = %d\n", *l->locinfo->lconv_intl_refcount);
- }
+ ok(l->locinfo->lconv != l2->locinfo->lconv, "same lconv pointers\n");
+ ok(l->locinfo->lconv_intl_refcount != l2->locinfo->lconv_intl_refcount, "same lconv_intl_refcount pointers\n");
+ ok(*l->locinfo->lconv_intl_refcount == 1, "refcount = %d\n", *l->locinfo->lconv_intl_refcount);
ok(!l2->locinfo->lconv_intl_refcount, "nonnull refcount pointer for C locale\n");
- todo_wine {
- ok(l->locinfo->lconv->decimal_point != l2->locinfo->lconv->decimal_point, "same LC_NUMERIC pointers\n");
- ok(l->locinfo->lconv_num_refcount != l2->locinfo->lconv_num_refcount, "same lconv_num_refcount pointers\n");
- ok(l->locinfo->lconv_num_refcount, "null refcount pointer in non-C locale\n");
- if(l->locinfo->lconv_num_refcount)
- ok(*l->locinfo->lconv_num_refcount == 1, "refcount = %d\n", *l->locinfo->lconv_num_refcount);
- }
+ ok(l->locinfo->lconv->decimal_point != l2->locinfo->lconv->decimal_point, "same LC_NUMERIC pointers\n");
+ ok(l->locinfo->lconv_num_refcount != l2->locinfo->lconv_num_refcount, "same lconv_num_refcount pointers\n");
+ ok(*l->locinfo->lconv_num_refcount == 1, "refcount = %d\n", *l->locinfo->lconv_num_refcount);
ok(!l2->locinfo->lconv_num_refcount, "nonnull refcount pointer for C locale\n");
- todo_wine {
- ok(l->locinfo->lconv->currency_symbol != l2->locinfo->lconv->currency_symbol, "same LC_MONETARY pointers\n");
- ok(l->locinfo->lconv_mon_refcount != l2->locinfo->lconv_mon_refcount, "same lconv_mon_refcount pointers\n");
- ok(l->locinfo->lconv_mon_refcount, "null refcount pointer in non-C locale\n");
- if(l->locinfo->lconv_mon_refcount)
- ok(*l->locinfo->lconv_mon_refcount == 1, "refcount = %d\n", *l->locinfo->lconv_mon_refcount);
- }
+ ok(l->locinfo->lconv->currency_symbol != l2->locinfo->lconv->currency_symbol, "same LC_MONETARY pointers\n");
+ ok(l->locinfo->lconv_mon_refcount != l2->locinfo->lconv_mon_refcount, "same lconv_mon_refcount pointers\n");
+ ok(*l->locinfo->lconv_mon_refcount == 1, "refcount = %d\n", *l->locinfo->lconv_mon_refcount);
ok(!l2->locinfo->lconv_mon_refcount, "nonnull refcount pointer for C locale\n");
ok(l->locinfo->lc_time_curr == l2->locinfo->lc_time_curr, "different lc_time_curr pointers\n");
@@ -2320,76 +2248,54 @@ static void test__get_current_locale(void)
p_setlocale(LC_TIME, "C");
l2 = p__get_current_locale();
- todo_wine {
- ok(l->locinfo->refcount == 1, "refcount = %d\n", l->locinfo->refcount);
- ok(l2->locinfo->refcount == 2, "refcount = %d\n", l2->locinfo->refcount);
- }
+ ok(l->locinfo->refcount == 1, "refcount = %d\n", l->locinfo->refcount);
+ ok(l2->locinfo->refcount == 2, "refcount = %d\n", l2->locinfo->refcount);
for(i = LC_MIN+1; i <= LC_MAX; i++) {
- todo_wine {
- ok(l->locinfo->lc_category[i].locale != l2->locinfo->lc_category[i].locale,
- "same locale name pointers for category %d\n", i);
- ok(l->locinfo->lc_category[i].refcount != l2->locinfo->lc_category[i].refcount,
- "same refcount pointers for category %d\n", i);
- }
+ ok(l->locinfo->lc_category[i].locale != l2->locinfo->lc_category[i].locale,
+ "same locale name pointers for category %d\n", i);
+ ok(l->locinfo->lc_category[i].refcount != l2->locinfo->lc_category[i].refcount,
+ "same refcount pointers for category %d\n", i);
ok(*l->locinfo->lc_category[i].refcount == 1, "refcount = %d for category %d\n",
*l->locinfo->lc_category[i].refcount, i);
todo_wine ok(*l2->locinfo->lc_category[i].refcount == 2, "refcount = %d for category %d\n",
*l2->locinfo->lc_category[i].refcount, i);
}
- todo_wine {
- ok(l->locinfo->lc_collate_cp != l2->locinfo->lc_collate_cp, "same lc_collate_cp %u, %u\n",
- l->locinfo->lc_collate_cp, l2->locinfo->lc_collate_cp);
+ ok(l->locinfo->lc_collate_cp != l2->locinfo->lc_collate_cp, "same lc_collate_cp %u, %u\n",
+ l->locinfo->lc_collate_cp, l2->locinfo->lc_collate_cp);
- ok(l->locinfo->lc_codepage != l2->locinfo->lc_codepage, "same lc_codepages %u, %u\n",
- l->locinfo->lc_codepage, l2->locinfo->lc_codepage);
- ok(l->locinfo->lc_clike != l2->locinfo->lc_clike, "same lc_clike values %d, %d\n",
- l->locinfo->lc_clike, l2->locinfo->lc_clike);
- ok(l->locinfo->lc_clike, "non-C locale is C-like\n");
- }
+ ok(l->locinfo->lc_codepage != l2->locinfo->lc_codepage, "same lc_codepages %u, %u\n",
+ l->locinfo->lc_codepage, l2->locinfo->lc_codepage);
+ ok(l->locinfo->lc_clike != l2->locinfo->lc_clike, "same lc_clike values %d, %d\n",
+ l->locinfo->lc_clike, l2->locinfo->lc_clike);
+ ok(l->locinfo->lc_clike, "non-C locale is C-like\n");
ok(!l2->locinfo->lc_clike, "C locale is not C-like\n");
- todo_wine {
- ok(l->locinfo->ctype1 != l2->locinfo->ctype1, "same ctype1 pointers\n");
- ok(l->locinfo->pclmap != l2->locinfo->pclmap, "same clmap pointers\n");
- ok(l->locinfo->pcumap != l2->locinfo->pcumap, "same cumap pointers\n");
- ok(l->locinfo->ctype1_refcount != l2->locinfo->ctype1_refcount, "same ctype1_refcount pointers\n");
- ok(l->locinfo->ctype1_refcount, "null refcount pointer for non-C locale\n");
- if(l->locinfo->ctype1_refcount)
- ok(*l->locinfo->ctype1_refcount == 1, "refcount = %d\n", *l->locinfo->ctype1_refcount);
- }
+ ok(l->locinfo->ctype1 != l2->locinfo->ctype1, "same ctype1 pointers\n");
+ ok(l->locinfo->pclmap != l2->locinfo->pclmap, "same clmap pointers\n");
+ ok(l->locinfo->pcumap != l2->locinfo->pcumap, "same cumap pointers\n");
+ ok(l->locinfo->ctype1_refcount != l2->locinfo->ctype1_refcount, "same ctype1_refcount pointers\n");
+ ok(*l->locinfo->ctype1_refcount == 1, "refcount = %d\n", *l->locinfo->ctype1_refcount);
ok(!l2->locinfo->ctype1_refcount, "nonnull refcount pointer for C locale\n");
- todo_wine {
- ok(l->locinfo->lconv != l2->locinfo->lconv, "same lconv pointers\n");
- ok(l->locinfo->lconv_intl_refcount != l2->locinfo->lconv_intl_refcount, "same lconv_intl_refcount pointers\n");
- ok(l->locinfo->lconv_intl_refcount, "null refcount pointer in non-C locale\n");
- if(l->locinfo->lconv_intl_refcount)
- ok(*l->locinfo->lconv_intl_refcount == 1, "refcount = %d\n", *l->locinfo->lconv_intl_refcount);
- }
+ ok(l->locinfo->lconv != l2->locinfo->lconv, "same lconv pointers\n");
+ ok(l->locinfo->lconv_intl_refcount != l2->locinfo->lconv_intl_refcount, "same lconv_intl_refcount pointers\n");
+ ok(*l->locinfo->lconv_intl_refcount == 1, "refcount = %d\n", *l->locinfo->lconv_intl_refcount);
ok(!l2->locinfo->lconv_intl_refcount, "nonnull refcount pointer for C locale\n");
- todo_wine {
- ok(l->locinfo->lconv->decimal_point != l2->locinfo->lconv->decimal_point, "same LC_NUMERIC pointers\n");
- ok(l->locinfo->lconv_num_refcount != l2->locinfo->lconv_num_refcount, "same lconv_num_refcount pointers\n");
- ok(l->locinfo->lconv_num_refcount, "null refcount pointer in non-C locale\n");
- if(l->locinfo->lconv_num_refcount)
- ok(*l->locinfo->lconv_num_refcount == 1, "refcount = %d\n", *l->locinfo->lconv_num_refcount);
- }
+ ok(l->locinfo->lconv->decimal_point != l2->locinfo->lconv->decimal_point, "same LC_NUMERIC pointers\n");
+ ok(l->locinfo->lconv_num_refcount != l2->locinfo->lconv_num_refcount, "same lconv_num_refcount pointers\n");
+ ok(*l->locinfo->lconv_num_refcount == 1, "refcount = %d\n", *l->locinfo->lconv_num_refcount);
ok(!l2->locinfo->lconv_num_refcount, "nonnull refcount pointer for C locale\n");
- todo_wine {
- ok(l->locinfo->lconv->currency_symbol != l2->locinfo->lconv->currency_symbol, "same LC_MONETARY pointers\n");
- ok(l->locinfo->lconv_mon_refcount != l2->locinfo->lconv_mon_refcount, "same lconv_mon_refcount pointers\n");
- ok(l->locinfo->lconv_mon_refcount, "null refcount pointer in non-C locale\n");
- if(l->locinfo->lconv_mon_refcount)
- ok(*l->locinfo->lconv_mon_refcount == 1, "refcount = %d\n", *l->locinfo->lconv_mon_refcount);
- }
+ ok(l->locinfo->lconv->currency_symbol != l2->locinfo->lconv->currency_symbol, "same LC_MONETARY pointers\n");
+ ok(l->locinfo->lconv_mon_refcount != l2->locinfo->lconv_mon_refcount, "same lconv_mon_refcount pointers\n");
+ ok(*l->locinfo->lconv_mon_refcount == 1, "refcount = %d\n", *l->locinfo->lconv_mon_refcount);
ok(!l2->locinfo->lconv_mon_refcount, "nonnull refcount pointer for C locale\n");
- todo_wine ok(l->locinfo->lc_time_curr != l2->locinfo->lc_time_curr, "same lc_time_curr pointers\n");
+ ok(l->locinfo->lc_time_curr != l2->locinfo->lc_time_curr, "same lc_time_curr pointers\n");
ok(l->locinfo->lc_time_curr->unk == 1, "unk = %d\n", l->locinfo->lc_time_curr->unk);
- todo_wine ok(l->locinfo->lc_time_curr->refcount == 1, "refcount = %d\n", l->locinfo->lc_time_curr->refcount);
+ ok(l->locinfo->lc_time_curr->refcount == 1, "refcount = %d\n", l->locinfo->lc_time_curr->refcount);
ok(l2->locinfo->lc_time_curr->unk == 1, "unk = %d\n", l2->locinfo->lc_time_curr->unk);
ok(l2->locinfo->lc_time_curr->refcount == 3 || l2->locinfo->lc_time_curr->refcount == 2,
"refcount = %d\n", l2->locinfo->lc_time_curr->refcount);
diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c
index 1487146af8d6..6210039eca16 100644
--- a/dlls/msvcrt/locale.c
+++ b/dlls/msvcrt/locale.c
@@ -510,17 +510,22 @@ static inline void swap_pointers(void **p1, void **p2) {
*p2 = hlp;
}
-/* INTERNAL: returns pthreadlocinfo struct */
-MSVCRT_pthreadlocinfo get_locinfo(void) {
+/* INTERNAL: returns pointer to pointer to threadlocinfo struct */
+static MSVCRT_pthreadlocinfo *get_locinfo_ptr(void) {
thread_data_t *data = msvcrt_get_thread_data();
if(!data || !data->have_locale)
- return MSVCRT_locale->locinfo;
+ return &MSVCRT_locale->locinfo;
+
+ return &data->locinfo;
+}
- return data->locinfo;
+/* INTERNAL: returns threadlocinfo struct */
+MSVCRT_pthreadlocinfo get_locinfo(void) {
+ return *get_locinfo_ptr();
}
-/* INTERNAL: returns pthreadlocinfo struct */
+/* INTERNAL: returns threadmbcinfo struct */
MSVCRT_pthreadmbcinfo get_mbcinfo(void) {
thread_data_t *data = msvcrt_get_thread_data();
@@ -1956,185 +1961,8 @@ char* CDECL MSVCRT_setlocale(int category, const char* locale)
if(locale[0] != 'C' || locale[1] != '\0')
initial_locale = FALSE;
- if(locinfo->lc_handle[MSVCRT_LC_COLLATE]!=newlocinfo->lc_handle[MSVCRT_LC_COLLATE]
- || locinfo->lc_id[MSVCRT_LC_COLLATE].wCodePage!=newlocinfo->lc_id[MSVCRT_LC_COLLATE].wCodePage) {
- locinfo->lc_collate_cp = newlocinfo->lc_collate_cp;
- locinfo->lc_handle[MSVCRT_LC_COLLATE] =
- newlocinfo->lc_handle[MSVCRT_LC_COLLATE];
- locinfo->lc_id[MSVCRT_LC_COLLATE] =
- newlocinfo->lc_id[MSVCRT_LC_COLLATE];
-
-#if _MSVCR_VER >= 110
- swap_pointers((void**)&locinfo->lc_name[MSVCRT_LC_COLLATE],
- (void**)&newlocinfo->lc_name[MSVCRT_LC_COLLATE]);
-#endif
- }
- if(newlocinfo->lc_category[MSVCRT_LC_COLLATE].locale) {
- swap_pointers((void**)&locinfo->lc_category[MSVCRT_LC_COLLATE].locale,
- (void**)&newlocinfo->lc_category[MSVCRT_LC_COLLATE].locale);
- swap_pointers((void**)&locinfo->lc_category[MSVCRT_LC_COLLATE].refcount,
- (void**)&newlocinfo->lc_category[MSVCRT_LC_COLLATE].refcount);
- }
-
- if(locinfo->lc_handle[MSVCRT_LC_CTYPE]!=newlocinfo->lc_handle[MSVCRT_LC_CTYPE]
- || locinfo->lc_id[MSVCRT_LC_CTYPE].wCodePage!=newlocinfo->lc_id[MSVCRT_LC_CTYPE].wCodePage) {
- locinfo->lc_handle[MSVCRT_LC_CTYPE] =
- newlocinfo->lc_handle[MSVCRT_LC_CTYPE];
- locinfo->lc_id[MSVCRT_LC_CTYPE] =
- newlocinfo->lc_id[MSVCRT_LC_CTYPE];
-
- locinfo->lc_codepage = newlocinfo->lc_codepage;
- locinfo->lc_clike = newlocinfo->lc_clike;
- locinfo->mb_cur_max = newlocinfo->mb_cur_max;
-
- swap_pointers((void**)&locinfo->ctype1_refcount,
- (void**)&newlocinfo->ctype1_refcount);
- swap_pointers((void**)&locinfo->ctype1, (void**)&newlocinfo->ctype1);
- swap_pointers((void**)&locinfo->pctype, (void**)&newlocinfo->pctype);
- swap_pointers((void**)&locinfo->pclmap, (void**)&newlocinfo->pclmap);
- swap_pointers((void**)&locinfo->pcumap, (void**)&newlocinfo->pcumap);
-
-#if _MSVCR_VER >= 110
- swap_pointers((void**)&locinfo->lc_name[MSVCRT_LC_CTYPE],
- (void**)&newlocinfo->lc_name[MSVCRT_LC_CTYPE]);
-#endif
- }
- if(newlocinfo->lc_category[MSVCRT_LC_CTYPE].locale) {
- swap_pointers((void**)&locinfo->lc_category[MSVCRT_LC_CTYPE].locale,
- (void**)&newlocinfo->lc_category[MSVCRT_LC_CTYPE].locale);
- swap_pointers((void**)&locinfo->lc_category[MSVCRT_LC_CTYPE].refcount,
- (void**)&newlocinfo->lc_category[MSVCRT_LC_CTYPE].refcount);
- }
-
- if(newlocinfo->lc_category[MSVCRT_LC_MONETARY].locale) {
- swap_pointers((void**)&locinfo->lc_category[MSVCRT_LC_MONETARY].locale,
- (void**)&newlocinfo->lc_category[MSVCRT_LC_MONETARY].locale);
- swap_pointers((void**)&locinfo->lc_category[MSVCRT_LC_MONETARY].refcount,
- (void**)&newlocinfo->lc_category[MSVCRT_LC_MONETARY].refcount);
- }
-
- if(newlocinfo->lc_category[MSVCRT_LC_NUMERIC].locale) {
- swap_pointers((void**)&locinfo->lc_category[MSVCRT_LC_NUMERIC].locale,
- (void**)&newlocinfo->lc_category[MSVCRT_LC_NUMERIC].locale);
- swap_pointers((void**)&locinfo->lc_category[MSVCRT_LC_NUMERIC].refcount,
- (void**)&newlocinfo->lc_category[MSVCRT_LC_NUMERIC].refcount);
- }
-
- if((locinfo->lc_handle[MSVCRT_LC_MONETARY]!=newlocinfo->lc_handle[MSVCRT_LC_MONETARY]
- || locinfo->lc_id[MSVCRT_LC_MONETARY].wCodePage!=newlocinfo->lc_id[MSVCRT_LC_MONETARY].wCodePage)
- && (locinfo->lc_handle[MSVCRT_LC_NUMERIC]!=newlocinfo->lc_handle[MSVCRT_LC_NUMERIC]
- || locinfo->lc_id[MSVCRT_LC_NUMERIC].wCodePage!=newlocinfo->lc_id[MSVCRT_LC_NUMERIC].wCodePage)) {
- locinfo->lc_handle[MSVCRT_LC_MONETARY] =
- newlocinfo->lc_handle[MSVCRT_LC_MONETARY];
- locinfo->lc_id[MSVCRT_LC_MONETARY] =
- newlocinfo->lc_id[MSVCRT_LC_MONETARY];
- locinfo->lc_handle[MSVCRT_LC_NUMERIC] =
- newlocinfo->lc_handle[MSVCRT_LC_NUMERIC];
- locinfo->lc_id[MSVCRT_LC_NUMERIC] =
- newlocinfo->lc_id[MSVCRT_LC_NUMERIC];
- swap_pointers((void**)&locinfo->lconv, (void**)&newlocinfo->lconv);
- } else {
- if(locinfo->lc_handle[MSVCRT_LC_MONETARY]!=newlocinfo->lc_handle[MSVCRT_LC_MONETARY]
- || locinfo->lc_id[MSVCRT_LC_MONETARY].wCodePage!=newlocinfo->lc_id[MSVCRT_LC_MONETARY].wCodePage) {
- locinfo->lc_handle[MSVCRT_LC_MONETARY] =
- newlocinfo->lc_handle[MSVCRT_LC_MONETARY];
- locinfo->lc_id[MSVCRT_LC_MONETARY] =
- newlocinfo->lc_id[MSVCRT_LC_MONETARY];
-
- swap_pointers((void**)&locinfo->lconv->int_curr_symbol,
- (void**)&newlocinfo->lconv->int_curr_symbol);
- swap_pointers((void**)&locinfo->lconv->currency_symbol,
- (void**)&newlocinfo->lconv->currency_symbol);
- swap_pointers((void**)&locinfo->lconv->mon_decimal_point,
- (void**)&newlocinfo->lconv->mon_decimal_point);
- swap_pointers((void**)&locinfo->lconv->mon_thousands_sep,
- (void**)&newlocinfo->lconv->mon_thousands_sep);
- swap_pointers((void**)&locinfo->lconv->mon_grouping,
- (void**)&newlocinfo->lconv->mon_grouping);
- swap_pointers((void**)&locinfo->lconv->positive_sign,
- (void**)&newlocinfo->lconv->positive_sign);
- swap_pointers((void**)&locinfo->lconv->negative_sign,
- (void**)&newlocinfo->lconv->negative_sign);
-
-#if _MSVCR_VER >= 100
- swap_pointers((void**)&locinfo->lconv->_W_int_curr_symbol,
- (void**)&newlocinfo->lconv->_W_int_curr_symbol);
- swap_pointers((void**)&locinfo->lconv->_W_currency_symbol,
- (void**)&newlocinfo->lconv->_W_currency_symbol);
- swap_pointers((void**)&locinfo->lconv->_W_mon_decimal_point,
- (void**)&newlocinfo->lconv->_W_mon_decimal_point);
- swap_pointers((void**)&locinfo->lconv->_W_mon_thousands_sep,
- (void**)&newlocinfo->lconv->_W_mon_thousands_sep);
- swap_pointers((void**)&locinfo->lconv->_W_positive_sign,
- (void**)&newlocinfo->lconv->_W_positive_sign);
- swap_pointers((void**)&locinfo->lconv->_W_negative_sign,
- (void**)&newlocinfo->lconv->_W_negative_sign);
-#endif
-
- locinfo->lconv->int_frac_digits = newlocinfo->lconv->int_frac_digits;
- locinfo->lconv->frac_digits = newlocinfo->lconv->frac_digits;
- locinfo->lconv->p_cs_precedes = newlocinfo->lconv->p_cs_precedes;
- locinfo->lconv->p_sep_by_space = newlocinfo->lconv->p_sep_by_space;
- locinfo->lconv->n_cs_precedes = newlocinfo->lconv->n_cs_precedes;
- locinfo->lconv->n_sep_by_space = newlocinfo->lconv->n_sep_by_space;
- locinfo->lconv->p_sign_posn = newlocinfo->lconv->p_sign_posn;
- locinfo->lconv->n_sign_posn = newlocinfo->lconv->n_sign_posn;
-
-#if _MSVCR_VER >= 110
- swap_pointers((void**)&locinfo->lc_name[MSVCRT_LC_MONETARY],
- (void**)&newlocinfo->lc_name[MSVCRT_LC_MONETARY]);
-#endif
- }
-
- if(locinfo->lc_handle[MSVCRT_LC_NUMERIC]!=newlocinfo->lc_handle[MSVCRT_LC_NUMERIC]
- || locinfo->lc_id[MSVCRT_LC_NUMERIC].wCodePage!=newlocinfo->lc_id[MSVCRT_LC_NUMERIC].wCodePage) {
- locinfo->lc_handle[MSVCRT_LC_NUMERIC] =
- newlocinfo->lc_handle[MSVCRT_LC_NUMERIC];
- locinfo->lc_id[MSVCRT_LC_NUMERIC] =
- newlocinfo->lc_id[MSVCRT_LC_NUMERIC];
-
- swap_pointers((void**)&locinfo->lconv->decimal_point,
- (void**)&newlocinfo->lconv->decimal_point);
- swap_pointers((void**)&locinfo->lconv->thousands_sep,
- (void**)&newlocinfo->lconv->thousands_sep);
- swap_pointers((void**)&locinfo->lconv->grouping,
- (void**)&newlocinfo->lconv->grouping);
-
-#if _MSVCR_VER >= 100
- swap_pointers((void**)&locinfo->lconv->_W_decimal_point,
- (void**)&newlocinfo->lconv->_W_decimal_point);
- swap_pointers((void**)&locinfo->lconv->_W_thousands_sep,
- (void**)&newlocinfo->lconv->_W_thousands_sep);
-#endif
-
-#if _MSVCR_VER >= 110
- swap_pointers((void**)&locinfo->lc_name[MSVCRT_LC_NUMERIC],
- (void**)&newlocinfo->lc_name[MSVCRT_LC_NUMERIC]);
-#endif
- }
- }
-
- if(locinfo->lc_handle[MSVCRT_LC_TIME]!=newlocinfo->lc_handle[MSVCRT_LC_TIME]
- || locinfo->lc_id[MSVCRT_LC_TIME].wCodePage!=newlocinfo->lc_id[MSVCRT_LC_TIME].wCodePage) {
- locinfo->lc_handle[MSVCRT_LC_TIME] =
- newlocinfo->lc_handle[MSVCRT_LC_TIME];
- locinfo->lc_id[MSVCRT_LC_TIME] =
- newlocinfo->lc_id[MSVCRT_LC_TIME];
- swap_pointers((void**)&locinfo->lc_time_curr,
- (void**)&newlocinfo->lc_time_curr);
-
-#if _MSVCR_VER >= 110
- swap_pointers((void**)&locinfo->lc_name[MSVCRT_LC_TIME],
- (void**)&newlocinfo->lc_name[MSVCRT_LC_TIME]);
-#endif
- }
- if(newlocinfo->lc_category[MSVCRT_LC_TIME].locale) {
- swap_pointers((void**)&locinfo->lc_category[MSVCRT_LC_TIME].locale,
- (void**)&newlocinfo->lc_category[MSVCRT_LC_TIME].locale);
- swap_pointers((void**)&locinfo->lc_category[MSVCRT_LC_TIME].refcount,
- (void**)&newlocinfo->lc_category[MSVCRT_LC_TIME].refcount);
- }
-
+ locinfo = newlocinfo;
+ swap_pointers(get_locinfo_ptr(), &newlocinfo);
free_locinfo(newlocinfo);
_unlock_locales();
--
2.24.0
Jan. 31, 2020
[PATCH 6/8] msvcrt: Share __lc_time_data between threadlocinfo instances.
by Chip Davis
My testing shows that unk[1] is some sort of refcount. I've updated a
few places with this knowledge.
Signed-off-by: Chip Davis <cdavis(a)codeweavers.com>
---
dlls/msvcr90/tests/msvcr90.c | 10 +++++-----
dlls/msvcrt/locale.c | 10 ++++++++--
dlls/msvcrt/msvcrt.h | 3 ++-
dlls/msvcrt/tests/time.c | 7 ++++---
4 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/dlls/msvcr90/tests/msvcr90.c b/dlls/msvcr90/tests/msvcr90.c
index 4e28cafea0d8..664ab49317a9 100644
--- a/dlls/msvcr90/tests/msvcr90.c
+++ b/dlls/msvcr90/tests/msvcr90.c
@@ -2072,7 +2072,7 @@ static void test__get_current_locale(void)
todo_wine ok(*l->locinfo->lconv_mon_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_mon_refcount);
ok(l->locinfo->lc_time_curr == l2->locinfo->lc_time_curr, "different lc_time_curr pointers\n");
- todo_wine ok(l->locinfo->lc_time_curr->unk == 1, "unk = %d\n", l->locinfo->lc_time_curr->unk);
+ ok(l->locinfo->lc_time_curr->unk == 1, "unk = %d\n", l->locinfo->lc_time_curr->unk);
todo_wine ok(l->locinfo->lc_time_curr->refcount == 3, "refcount = %d\n", l->locinfo->lc_time_curr->refcount);
p__free_locale(l2);
@@ -2147,7 +2147,7 @@ static void test__get_current_locale(void)
todo_wine ok(*l->locinfo->lconv_mon_refcount == 3, "refcount = %d\n", *l->locinfo->lconv_mon_refcount);
ok(l->locinfo->lc_time_curr == l2->locinfo->lc_time_curr, "different lc_time_curr pointers\n");
- todo_wine ok(l->locinfo->lc_time_curr->unk == 1, "unk = %d\n", l->locinfo->lc_time_curr->unk);
+ ok(l->locinfo->lc_time_curr->unk == 1, "unk = %d\n", l->locinfo->lc_time_curr->unk);
todo_wine ok(l->locinfo->lc_time_curr->refcount == 3, "refcount = %d\n", l->locinfo->lc_time_curr->refcount);
p__free_locale(l2);
@@ -2230,7 +2230,7 @@ static void test__get_current_locale(void)
ok(!l2->locinfo->lconv_mon_refcount, "nonnull refcount pointer for C locale\n");
ok(l->locinfo->lc_time_curr == l2->locinfo->lc_time_curr, "different lc_time_curr pointers\n");
- todo_wine ok(l->locinfo->lc_time_curr->unk == 1, "unk = %d\n", l->locinfo->lc_time_curr->unk);
+ ok(l->locinfo->lc_time_curr->unk == 1, "unk = %d\n", l->locinfo->lc_time_curr->unk);
todo_wine ok(l->locinfo->lc_time_curr->refcount == 3, "refcount = %d\n", l->locinfo->lc_time_curr->refcount);
p__free_locale(l2);
@@ -2312,7 +2312,7 @@ static void test__get_current_locale(void)
ok(!l2->locinfo->lconv_mon_refcount, "nonnull refcount pointer for C locale\n");
ok(l->locinfo->lc_time_curr == l2->locinfo->lc_time_curr, "different lc_time_curr pointers\n");
- todo_wine ok(l->locinfo->lc_time_curr->unk == 1, "unk = %d\n", l->locinfo->lc_time_curr->unk);
+ ok(l->locinfo->lc_time_curr->unk == 1, "unk = %d\n", l->locinfo->lc_time_curr->unk);
todo_wine ok(l->locinfo->lc_time_curr->refcount == 3, "refcount = %d\n", l->locinfo->lc_time_curr->refcount);
p__free_locale(l2);
@@ -2391,7 +2391,7 @@ static void test__get_current_locale(void)
ok(l->locinfo->lc_time_curr->unk == 1, "unk = %d\n", l->locinfo->lc_time_curr->unk);
todo_wine ok(l->locinfo->lc_time_curr->refcount == 1, "refcount = %d\n", l->locinfo->lc_time_curr->refcount);
ok(l2->locinfo->lc_time_curr->unk == 1, "unk = %d\n", l2->locinfo->lc_time_curr->unk);
- todo_wine ok(l2->locinfo->lc_time_curr->refcount == 3 || l2->locinfo->lc_time_curr->refcount == 2,
+ ok(l2->locinfo->lc_time_curr->refcount == 3 || l2->locinfo->lc_time_curr->refcount == 2,
"refcount = %d\n", l2->locinfo->lc_time_curr->refcount);
p__free_locale(l2);
diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c
index 8263f0ba1f83..1487146af8d6 100644
--- a/dlls/msvcrt/locale.c
+++ b/dlls/msvcrt/locale.c
@@ -131,7 +131,7 @@ MSVCRT___lc_time_data cloc_time_data =
#if _MSVCR_VER < 110
MAKELCID(LANG_ENGLISH, SORT_DEFAULT),
#endif
- {1, 0},
+ 1, 1,
{{sun, mon, tue, wed, thu, fri, sat,
sunday, monday, tuesday, wednesday, thursday, friday, saturday,
jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec,
@@ -976,7 +976,8 @@ void free_locinfo(MSVCRT_pthreadlocinfo locinfo)
MSVCRT_free(locinfo->ctype1);
}
- if(locinfo->lc_time_curr != &cloc_time_data)
+ if(!InterlockedDecrement(&locinfo->lc_time_curr->refcount)
+ && locinfo->lc_time_curr != &cloc_time_data)
MSVCRT_free(locinfo->lc_time_curr);
MSVCRT_free(locinfo);
@@ -1117,6 +1118,8 @@ static MSVCRT___lc_time_data* create_time_data(LCID lcid)
#else
cur->lcid = lcid;
#endif
+ cur->unk = 1;
+ cur->refcount = 1;
return cur;
}
@@ -1820,6 +1823,8 @@ static MSVCRT_pthreadlocinfo create_locinfo(int category,
free_locinfo(locinfo);
return NULL;
}
+ locinfo->lc_time_curr = old_locinfo->lc_time_curr;
+ InterlockedIncrement(&locinfo->lc_time_curr->refcount);
} else if(lcid[MSVCRT_LC_TIME] && (category==MSVCRT_LC_ALL || category==MSVCRT_LC_TIME)) {
if(!update_threadlocinfo_category(lcid[MSVCRT_LC_TIME],
cp[MSVCRT_LC_TIME], locinfo, MSVCRT_LC_TIME)) {
@@ -1843,6 +1848,7 @@ static MSVCRT_pthreadlocinfo create_locinfo(int category,
return NULL;
}
locinfo->lc_time_curr = &cloc_time_data;
+ InterlockedIncrement(&locinfo->lc_time_curr->refcount);
}
return locinfo;
diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h
index 244df7d23ccc..e5a22c68ee8b 100644
--- a/dlls/msvcrt/msvcrt.h
+++ b/dlls/msvcrt/msvcrt.h
@@ -146,7 +146,8 @@ typedef struct {
#if _MSVCR_VER < 110
LCID lcid;
#endif
- int unk[2];
+ int unk;
+ int refcount;
union {
const MSVCRT_wchar_t *wstr[43];
struct {
diff --git a/dlls/msvcrt/tests/time.c b/dlls/msvcrt/tests/time.c
index 45ed971ca89a..20212d19bfa5 100644
--- a/dlls/msvcrt/tests/time.c
+++ b/dlls/msvcrt/tests/time.c
@@ -47,7 +47,8 @@ typedef struct {
const char *date;
const char *time;
LCID lcid;
- int unk[2];
+ int unk;
+ int refcount;
} __lc_time_data;
static __time32_t (__cdecl *p_mkgmtime32)(struct tm*);
@@ -824,8 +825,8 @@ static void test_strftime(void)
return;
}
- /* TODO: find meaning of unk[0] */
- time_data.unk[0] = 1;
+ /* TODO: find meaning of unk */
+ time_data.unk = 1;
for (i=0; i<ARRAY_SIZE(tests_td); i++)
{
time_data.short_date = tests_td[i].short_date;
--
2.24.0
Jan. 31, 2020