http://bugs.winehq.org/show_bug.cgi?id=58811 --- Comment #8 from Chiitoo <chiitoo(a)gentoo.org> --- (In reply to Martín Durán from comment #7)
Just so it does not get lost, mr. Rafał Mużyło answered in the closed duplicate #58968 this:
(In reply to Rafał Mużyło from comment #4)
We might be looking at something close to a compiler bug here, due to a type mismatch.
The way wcsupr is implemented in msvcrt is by calling _wcsupr_s_l with '-1' as size, but the type for size is size_t (unsigned). _wcsupr_s_l doesn't really account for such values...
Just to verify my idea is going in the right direction, try changing that implementation in _wcsupr_l to - let's say '_wcsupr_s_l( str, wcslen(str)+1, locale);' (likely won't be quite correct for NULL str, but otherwise OK...well, unless I messed something up, so caution advised).
Just pasting here as I'd probably not be read as closed.
Thanks, I did see it, and did mean to test it, but forgot. I did it now, that is, in 'dlls/msvcrt/wcs.c': @@ -412,7 +412,7 @@ */ wchar_t* CDECL _wcsupr_l( wchar_t *str, _locale_t locale ) { - _wcsupr_s_l( str, -1, locale); + _wcsupr_s_l( str, wcslen(str)+1, locale); return str; } As far as I can tell so far though, it didn't change the behaviour here. Printing 'str' and 'locale' I did notice the latter being '(null)', though that happens at wine-10.0 as well. The former is just 'H' mostly currently while at 10.0 it switches to 'R' at around the part current builds hang. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.