https://bugs.winehq.org/show_bug.cgi?id=37159
Bug ID: 37159 Summary: valgrind shows a few uninitialized variables in riched20/tests/editor.c (test_EM_FINDWORDBREAK_A) Product: Wine Version: 1.7.24 Hardware: x86 OS: Linux Status: NEW Keywords: download, source, testcase, valgrind Severity: minor Priority: P2 Component: richedit Assignee: wine-bugs@winehq.org Reporter: austinenglish@gmail.com
Followup to bug 26101. A few issues remain in editor.c:
==18311== Conditional jump or move depends on uninitialised value(s) ==18311== at 0x532CBFB: strlenW (unicode.h:200) ==18311== by 0x532E6F8: WINPROC_CallProcWtoA (winproc.c:721) ==18311== by 0x532EE94: WINPROC_call_window (winproc.c:902) ==18311== by 0x52F37EC: call_window_proc (message.c:2223) ==18311== by 0x52F614E: send_message (message.c:3263) ==18311== by 0x52F671B: SendMessageW (message.c:3457) ==18311== by 0x4C8C2C1: test_EM_FINDWORDBREAK_A (editor.c:7385) ==18311== by 0x4C8D1FE: func_editor (editor.c:7659) ==18311== by 0x4C932D0: run_test (test.h:584) ==18311== by 0x4C9369C: main (test.h:654) ==18311== Uninitialised value was created by a stack allocation ==18311== at 0x4C8C239: test_EM_FINDWORDBREAK_A (editor.c:7363)
==18311== Use of uninitialised value of size 4 ==18311== at 0x401F269: wcstombs_sbcs (wctomb.c:187) ==18311== by 0x401FB2C: wine_cp_wcstombs (wctomb.c:456) ==18311== by 0x7BC6FD50: RtlUnicodeToMultiByteN (rtlstr.c:876) ==18311== by 0x532E753: WINPROC_CallProcWtoA (winproc.c:726) ==18311== by 0x532EE94: WINPROC_call_window (winproc.c:902) ==18311== by 0x52F37EC: call_window_proc (message.c:2223) ==18311== by 0x52F614E: send_message (message.c:3263) ==18311== by 0x52F671B: SendMessageW (message.c:3457) ==18311== by 0x4C8C2C1: test_EM_FINDWORDBREAK_A (editor.c:7385) ==18311== by 0x4C8D1FE: func_editor (editor.c:7659) ==18311== by 0x4C932D0: run_test (test.h:584) ==18311== by 0x4C9369C: main (test.h:654) ==18311== Uninitialised value was created by a stack allocation ==18311== at 0x4C8C239: test_EM_FINDWORDBREAK_A (editor.c:7363)
==18311== Use of uninitialised value of size 4 ==18311== at 0x401F287: wcstombs_sbcs (wctomb.c:187) ==18311== by 0x401FB2C: wine_cp_wcstombs (wctomb.c:456) ==18311== by 0x7BC6FD50: RtlUnicodeToMultiByteN (rtlstr.c:876) ==18311== by 0x532E753: WINPROC_CallProcWtoA (winproc.c:726) ==18311== by 0x532EE94: WINPROC_call_window (winproc.c:902) ==18311== by 0x52F37EC: call_window_proc (message.c:2223) ==18311== by 0x52F614E: send_message (message.c:3263) ==18311== by 0x52F671B: SendMessageW (message.c:3457) ==18311== by 0x4C8C2C1: test_EM_FINDWORDBREAK_A (editor.c:7385) ==18311== by 0x4C8D1FE: func_editor (editor.c:7659) ==18311== by 0x4C932D0: run_test (test.h:584) ==18311== by 0x4C9369C: main (test.h:654) ==18311== Uninitialised value was created by a stack allocation ==18311== at 0x4C8C239: test_EM_FINDWORDBREAK_A (editor.c:7363) ==18311==
https://bugs.winehq.org/show_bug.cgi?id=37159
Jactry Zeng jactry92@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jactry92@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=37159
marc.bessieres@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |marc.bessieres@gmail.com
--- Comment #1 from marc.bessieres@gmail.com --- Created attachment 50060 --> https://bugs.winehq.org/attachment.cgi?id=50060 patch for first uninitialized variable
Hello,
I'm trying to fix these errors. Could you check if the attached patch helps with the first reported uninitialized variable error? Could you also tell me if it is in a suitable state to send to wine-patches?
Cheers, Marc
https://bugs.winehq.org/show_bug.cgi?id=37159
--- Comment #2 from marc.bessieres@gmail.com --- Created attachment 50066 --> https://bugs.winehq.org/attachment.cgi?id=50066 patch for last 2 uninitialized variables
Hello,
This attachment should fix the last 2 uninitialized variables reported by valgrind. If you could check if it works for you too it'd be perfect. And also if you could tell me if the patches seem alright before sending them to wine-patches, it'd be great, as these will be the first ones I send.
Cheers, Marc
https://bugs.winehq.org/show_bug.cgi?id=37159
--- Comment #3 from marc.bessieres@gmail.com --- Hello,
For this bug, I submitted: http://source.winehq.org/patches/data/107855 http://source.winehq.org/patches/data/107856
Cheers, Marc
https://bugs.winehq.org/show_bug.cgi?id=37159
--- Comment #4 from Bruno Jesus 00cpxxx@gmail.com --- One of the patches was commited [1], the other was rejected as test failure.
[1] http://source.winehq.org/git/wine.git/commitdiff/85ca920d94c1c3be0c051d4b2a7...
https://bugs.winehq.org/show_bug.cgi?id=37159
--- Comment #5 from marc.bessieres@gmail.com --- Thank you for the feedback. I'm sorry I sent a bad patch like that, I'll do my best to not do it again.
I will look at the build failure in order to produce a correct patch.
https://bugs.winehq.org/show_bug.cgi?id=37159
--- Comment #6 from marc.bessieres@gmail.com --- I got confused because I didn't use the suppression files from Austin (https://github.com/austin987/wine_misc/blob/master/valgrind/valgrind-suppres...) Especially the suppression named: bug_28766_1
So my bad correction was for: ==3328== Conditional jump or move depends on uninitialised value(s) ==3328== at 0x582C4B2: bitmapinfoheader_from_user_bitmapinfo (dib.c:182) ==3328== by 0x582EFEC: GetDIBits (dib.c:1233) ==3328== by 0x6E02A09: create_icon_pixmaps (window.c:546) ==3328== by 0x6E02FB3: fetch_icon_data (window.c:631) ==3328== by 0x6E07D26: X11DRV_WindowPosChanged (window.c:2325) ==3328== by 0x565597E: set_window_pos (winpos.c:2150) ==3328== by 0x5655C35: USER_SetWindowPos (winpos.c:2223) ==3328== by 0x5655F77: SetWindowPos (winpos.c:2297) ==3328== by 0x56527E6: show_window (winpos.c:1122) ==3328== by 0x5652AFE: ShowWindow (winpos.c:1220) ==3328== by 0x564A086: WIN_CreateWindowEx (win.c:1667) ==3328== by 0x564A2CE: CreateWindowExA (win.c:1719) ==3328== by 0x516993D: new_window (editor.c:52) ==3328== by 0x5169AA4: new_richedit (editor.c:69) ==3328== by 0x516A713: test_EM_FINDTEXT (editor.c:332) ==3328== by 0x519573F: func_editor (editor.c:7606) ==3328== by 0x519FA85: run_test (test.h:584) ==3328== by 0x519FE73: main (test.h:654) ==3328== Uninitialised value was created by a stack allocation ==3328== at 0x6E02904: create_icon_pixmaps (window.c:531)
Which is in fact bug 30827. I'll continue working on a solution over there.
So in my opinion this bug can be closed as resolved.
Cheers, Marc
https://bugs.winehq.org/show_bug.cgi?id=37159
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |85ca920d94c1c3be0c051d4b2a7 | |597b6fdc069eb Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #7 from Austin English austinenglish@gmail.com --- Fixed by 85ca920d94c1c3be0c051d4b2a7597b6fdc069eb.
https://bugs.winehq.org/show_bug.cgi?id=37159
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.33.