https://bugs.winehq.org/show_bug.cgi?id=38344
Bug ID: 38344 Summary: Invalid memory access in get_registry_locale_info() Product: Wine Version: 1.7.39 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: bunglehead@gmail.com Distribution: ---
Running 'make monthcal.ok' under valgrind report invalid access in current Wine:
--- ==8452== Invalid read of size 2 ==8452== at 0x7B849503: get_registry_locale_info.isra.0 (locale.c:1210) ==8452== by 0x7B84AA3B: GetLocaleInfoW (locale.c:1398) ==8452== by 0x7B84C304: GetLocaleInfoA (locale.c:1290) ==8452== by 0x4C135D0: test_firstDay (monthcal.c:875) ==8452== by 0x4C135D0: func_monthcal (???:0) ==8452== by 0x4BDB822: main (test.h:584) ==8452== Address 0x48a0fb6 is 2 bytes after a recently re-allocated block of size 12 alloc'd ==8452== at 0x7BC4E507: initialize_block (heap.c:232) ==8452== by 0x7BC4E507: RtlAllocateHeap (???:0) ==8452== by 0x7B84252D: HeapAlloc (heap.c:271) ==8452== by 0x7B849494: get_registry_locale_info.isra.0 (locale.c:1170) ==8452== by 0x7B84AA3B: GetLocaleInfoW (locale.c:1398) ==8452== by 0x7B84C304: GetLocaleInfoA (locale.c:1290) ==8452== by 0x4C135D0: test_firstDay (monthcal.c:875) ==8452== by 0x4C135D0: func_monthcal (???:0) ==8452== by 0x4BDB822: main (test.h:584) ---
This is a regression introduced with http://source.winehq.org/git/wine.git/commit/8826ba1bc86fefa22c543608585ae8f... :
--- author Sebastian Lackner sebastian@fds-team.de Tue, 16 Dec 2014 03:10:34 +0000 (04:10 +0100) committer Alexandre Julliard julliard@winehq.org Tue, 16 Dec 2014 12:32:53 +0000 (13:32 +0100) commit 8826ba1bc86fefa22c543608585ae8f3b4310a5f ---
https://bugs.winehq.org/show_bug.cgi?id=38344
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Regression SHA1| |8826ba1bc86fefa22c543608585 | |ae8f3b4310a5f
https://bugs.winehq.org/show_bug.cgi?id=38344
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
https://bugs.winehq.org/show_bug.cgi?id=38344
--- Comment #1 from Nikolay Sivov bunglehead@gmail.com --- Same happens with 'make locale.ok' apparently:
--- ==4918== Invalid read of size 2 ==4918== at 0x7B84B7D4: get_registry_locale_info (locale.c:1210) ==4918== by 0x7B84BD16: GetLocaleInfoW (locale.c:1398) ==4918== by 0x7B84B992: GetLocaleInfoA (locale.c:1290) ==4918== by 0x7B848A74: EnumDateFormatsA (lcformat.c:1859) ==4918== by 0x490E819: test_EnumDateFormatsA (locale.c:3415) ==4918== by 0x4913CBF: func_locale (locale.c:4299) ==4918== by 0x4977896: run_test (test.h:584) ==4918== by 0x4977C62: main (test.h:654) ---
https://bugs.winehq.org/show_bug.cgi?id=38344
--- Comment #2 from Sebastian Lackner sebastian@fds-team.de --- Thanks for the report, taking a look. I assume my fix just revealed a different issue (either in the tests or functions using GetLocaleInfo*).
https://bugs.winehq.org/show_bug.cgi?id=38344
Simon swdevelop1981@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |swdevelop1981@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=38344
--- Comment #3 from Nikolay Sivov bunglehead@gmail.com --- I don't think it's a caller fault, in Monthcal tests at least there's no mismatch of buffer size passed to a call and actual size.
https://bugs.winehq.org/show_bug.cgi?id=38344
--- Comment #4 from Sebastian Lackner sebastian@fds-team.de --- Yes, I spoke too early, its indeed a regression. Patch sent: http://source.winehq.org/patches/data/110568
https://bugs.winehq.org/show_bug.cgi?id=38344
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, testcase, | |valgrind CC| |austinenglish@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=38344
--- Comment #5 from Sebastian Lackner sebastian@fds-team.de --- Should be fixed by http://source.winehq.org/git/wine.git/commit/51c21cca9848d65948d14bd70ddf37c..., please retest.
https://bugs.winehq.org/show_bug.cgi?id=38344
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |51c21cca9848d65948d14bd70dd | |f37ca2e2faf83 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #6 from Austin English austinenglish@gmail.com --- (In reply to Sebastian Lackner from comment #5)
Should be fixed by http://source.winehq.org/git/wine.git/commit/ 51c21cca9848d65948d14bd70ddf37ca2e2faf83, please retest.
Yep, thanks.
https://bugs.winehq.org/show_bug.cgi?id=38344
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.41.