http://bugs.winehq.org/show_bug.cgi?id=10141
Summary: Valgrind reports heap error early in wine startup Product: Wine Version: CVS/GIT Platform: Other OS/Version: other Status: NEW Severity: enhancement Priority: P2 Component: wine-misc AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
Sometimes on my core 2 gutsy laptop, warn+heap make test fails in msvcrt on tests/heap.c, so I tried it under valgrind:
$ cd dlls/msvcrt/tests $ WINEDEBUG=warn+heap valgrind --trace-children=yes --suppressions=$HOME/supp.txt ../../../tools/runtest -P wine -M msvcrt.dll -T ../../.. -p msvcrt_test.exe.so heap.c
(where supp.txt is system dependent and optional; it just skips false positives. I'll attach mine.)
Here's the first error in the output:
==12738== Invalid write of size 1 ==12738== at 0x4023894: memset (mc_replace_strmem.c:490) ==12738== by 0x43F178E: HEAP_CreateFreeBlock (heap.c:143) ==12738== by 0x43F184D: HEAP_ShrinkBlock (heap.c:567) ==12738== by 0x43F24D9: RtlAllocateHeap (heap.c:1220) ==12738== by 0x43F8FBA: load_builtin_callback (loader.c:1256) ==12738== by 0x402CABC: wine_dll_set_callback (loader.c:480) ==12738== by 0x43F61C7: __wine_process_init (loader.c:2504) ==12738== by 0x402C448: wine_init (loader.c:645) ==12738== by 0x7BF0139A: main (main.c:111) ==12738== Address 0x7F000140 is not stack'd, malloc'd or (recently) free'd
Amusingly, this error happens regardless of what app you try to run, even a nonexistant one emits the same error, e.g. $ WINEDEBUG=warn+heap valgrind --trace-children=yes --suppressions=$HOME/supp.txt xyzzy
Is this real, or a false positive? Maybe somebody just forgot an annotation in ntdll?
http://bugs.winehq.org/show_bug.cgi?id=10141
--- Comment #1 from Dan Kegel dank@kegel.com 2007-10-22 15:14:27 --- On a quick look, it might be a bug in the heap debugging code in ntdll, but I don't understand it well enough to say.
http://bugs.winehq.org/show_bug.cgi?id=10141
--- Comment #2 from Dan Kegel dank@kegel.com 2007-10-22 15:18:22 --- Created an attachment (id=8721) --> (http://bugs.winehq.org/attachment.cgi?id=8721) my little valgrind suppressions file
http://bugs.winehq.org/show_bug.cgi?id=10141
--- Comment #3 from Austin English austinenglish@gmail.com 2008-08-04 15:51:18 --- Is this still an issue in current (1.1.2 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=10141
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME
--- Comment #4 from Dan Kegel dank@kegel.com 2008-08-04 16:00:12 --- There are lots of issues, but this bug is old, let's close it and open new valgrind bugs if we feel strongly about them.
See also http://wiki.winehq.org/Wine_and_Valgrind
http://bugs.winehq.org/show_bug.cgi?id=10141
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Dan Kegel dank@kegel.com 2008-08-04 16:00:33 --- Closing
http://bugs.winehq.org/show_bug.cgi?id=10141
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|CVS/GIT |unspecified