https://bugs.winehq.org/show_bug.cgi?id=36573
Bug ID: 36573 Summary: valgrind shows uninitialized memory use in shlwapi/tests/path.c Product: Wine Version: 1.7.19 Hardware: x86 OS: Linux Status: NEW Keywords: download, source, testcase Severity: normal Priority: P2 Component: shlwapi Assignee: wine-bugs@winehq.org Reporter: austinenglish@gmail.com
==16152== Invalid read of size 2 ==16152== at 0x4E4A69F: PathCreateFromUrlW (path.c:3380) ==16152== by 0x4E4A224: PathCreateFromUrlA (path.c:3265) ==16152== by 0x4CB9F05: test_PathCreateFromUrl (path.c:281) ==16152== by 0x4CC3BA6: func_path (path.c:1609) ==16152== by 0x4CD34BC: run_test (test.h:584) ==16152== by 0x4CD38AB: main (test.h:654) ==16152== Address 0x4a0f3f0 is 0 bytes after a block of size 40 alloc'd ==16152== at 0x7BC4C6DF: notify_alloc (heap.c:255) ==16152== by 0x7BC50F23: RtlAllocateHeap (heap.c:1716) ==16152== by 0x7BC76380: RtlAnsiStringToUnicodeString (rtlstr.c:689) ==16152== by 0x7BC75997: RtlCreateUnicodeStringFromAsciiz (rtlstr.c:302) ==16152== by 0x4E4A1ED: PathCreateFromUrlA (path.c:3263) ==16152== by 0x4CB9F05: test_PathCreateFromUrl (path.c:281) ==16152== by 0x4CC3BA6: func_path (path.c:1609) ==16152== by 0x4CD34BC: run_test (test.h:584) ==16152== by 0x4CD38AB: main (test.h:654) ==16152==
==16152== Use of uninitialised value of size 4 ==16152== at 0x4E43154: get_char_typeW (unicode.h:137) ==16152== by 0x4E431CA: isalphaW (unicode.h:182) ==16152== by 0x4E4A6AC: PathCreateFromUrlW (path.c:3380) ==16152== by 0x4CBA26C: test_PathCreateFromUrl (path.c:299) ==16152== by 0x4CC3BA6: func_path (path.c:1609) ==16152== by 0x4CD34BC: run_test (test.h:584) ==16152== by 0x4CD38AB: main (test.h:654) ==16152== Uninitialised value was created by a client request ==16152== at 0x7BC4C4D6: mark_block_uninitialized (heap.c:209) ==16152== by 0x7BC4C641: initialize_block (heap.c:240) ==16152== by 0x7BC50F4D: RtlAllocateHeap (heap.c:1717) ==16152== by 0x4CB9764: GetWideString (path.c:186) ==16152== by 0x4CBA23F: test_PathCreateFromUrl (path.c:298) ==16152== by 0x4CC3BA6: func_path (path.c:1609) ==16152== by 0x4CD34BC: run_test (test.h:584) ==16152== by 0x4CD38AB: main (test.h:654) ==16152==
https://bugs.winehq.org/show_bug.cgi?id=36573
--- Comment #1 from Bruno Jesus 00cpxxx@gmail.com --- Created attachment 48664 --> https://bugs.winehq.org/attachment.cgi?id=48664 patch
Please try the attached patch (first problem only).
https://bugs.winehq.org/show_bug.cgi?id=36573
--- Comment #2 from Austin English austinenglish@gmail.com --- (In reply to Bruno Jesus from comment #1)
Created attachment 48664 [details] patch
Please try the attached patch (first problem only).
Works, thanks.
https://bugs.winehq.org/show_bug.cgi?id=36573
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36651
https://bugs.winehq.org/show_bug.cgi?id=36573
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |valgrind
https://bugs.winehq.org/show_bug.cgi?id=36573
--- Comment #3 from Bruno Jesus 00cpxxx@gmail.com --- Austin, the patch was commited: http://source.winehq.org/git/wine.git/commitdiff/9dacce1b4e58ebfe33d317ecb7a...
In your previous comment you are agreeing with me that it only fix the problem partially or you intended to say it fixed the bug?
https://bugs.winehq.org/show_bug.cgi?id=36573
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |9dacce1b4e58ebfe33d317ecb7a | |c7719552a9894 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #4 from Austin English austinenglish@gmail.com --- (In reply to Bruno Jesus from comment #3)
Austin, the patch was commited: http://source.winehq.org/git/wine.git/commitdiff/ 9dacce1b4e58ebfe33d317ecb7ac7719552a9894
In your previous comment you are agreeing with me that it only fix the problem partially or you intended to say it fixed the bug?
Only the first problem, but that's fine.
For the second issue, I'm no longer seeing it, but I've also upgraded my machine and am now using gcc-4.9.0 instead of 4.8.2. I'll file a bug for it if I can reproduce it again.
https://bugs.winehq.org/show_bug.cgi?id=36573
--- Comment #5 from Austin English austinenglish@gmail.com --- (In reply to Austin English from comment #4)
(In reply to Bruno Jesus from comment #3)
Austin, the patch was commited: http://source.winehq.org/git/wine.git/commitdiff/ 9dacce1b4e58ebfe33d317ecb7ac7719552a9894
In your previous comment you are agreeing with me that it only fix the problem partially or you intended to say it fixed the bug?
Only the first problem, but that's fine.
For the second issue, I'm no longer seeing it, but I've also upgraded my machine and am now using gcc-4.9.0 instead of 4.8.2. I'll file a bug for it if I can reproduce it again.
Actually, testing on my laptop, if I revert the patch, I do see the second issue now, so yeah, appears to fix both, just doesn't always occur.
https://bugs.winehq.org/show_bug.cgi?id=36573
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.20.