http://bugs.winehq.org/show_bug.cgi?id=26049
Summary: ws2_32/sock tests shows some leaks in AcceptEx? Product: Wine Version: 1.3.13 Platform: x86 OS/Version: Linux Status: NEW Keywords: download, source, testcase Severity: minor Priority: P2 Component: winsock AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com
Created an attachment (id=33221) --> (http://bugs.winehq.org/attachment.cgi?id=33221) valgrind log
Several leaks like: 36 bytes in 1 blocks are definitely lost at notify_alloc (heap.c:254) by RtlAllocateHeap (heap.c:1701) by WS2_AcceptEx (socket.c:1991) by test_AcceptEx (sock.c:4464) by func_sock (sock.c:4703) by run_test (test.h:556) by main (test.h:624)
http://bugs.winehq.org/show_bug.cgi?id=26049
--- Comment #1 from Bruno Jesus 00cpxxx@gmail.com 2011-08-03 22:07:30 CDT --- Created an attachment (id=35802) --> (http://bugs.winehq.org/attachment.cgi?id=35802) ws2_32: Fix a memory leak on WS2_AcceptEx
After some tests I found out wsa->read is not being freed (2 HeapAllocs, 1 HeapFree on the function). The attached patch fixes this.
I tried playing around with valgrind but I can't get any valgrind output using the following command inside ws2_32\tests (before or after the patch):
valgrind --tool=memcheck --leak-check=yes ../../../tools/runtest -p ws2_32_test.exe.so sock
Can anyone retest or teach me how to test correctly on valgrind? Thanks in advance.
http://bugs.winehq.org/show_bug.cgi?id=26049
--- Comment #2 from Austin English austinenglish@gmail.com 2011-08-04 14:57:40 CDT --- See http://wiki.winehq.org/Wine_and_Valgrind
fwiw, what I use is: export VALGRIND_OPTS="-q --trace-children=yes --track-origins=yes --gen-suppressions=all --suppressions=$WINESRC/tools/valgrind/valgrind-suppressions --suppressions=$WINESRC/tools/valgrind/gst.supp --leak-check=full --num-callers=20 --workaround-gcc296-bugs=yes --vex-iropt-precise-memory-exns=yes" export WINETEST_WRAPPER=valgrind export WINE_HEAP_TAIL_REDZONE=32 make -k test
http://bugs.winehq.org/show_bug.cgi?id=26049
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx@gmail.com
--- Comment #3 from Bruno Jesus 00cpxxx@gmail.com 2011-09-05 16:45:28 CDT --- My patch was commited : http://source.winehq.org/git/wine.git/commit/733c7f2c72053590da927e562d6fe9b...
If you rerun valgrind you will notice one of the leaks vanished, the other are not leaks, they happen when the function retuns SUCCESS so the wsa object is not released.
Can you retest, please?
http://bugs.winehq.org/show_bug.cgi?id=26049
--- Comment #4 from Austin English austinenglish@gmail.com 2011-09-06 12:18:45 CDT --- Updated results are at http://austinenglish.com/logs/valgrind/2011-09-06-04.15/vg-ws2_32_sock.txt
I still see two leaks (though there may be more tests now..).
http://bugs.winehq.org/show_bug.cgi?id=26049
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #33221|0 |1 is obsolete| |
--- Comment #5 from Austin English austinenglish@gmail.com 2011-09-06 12:19:11 CDT --- Created an attachment (id=36256) --> (http://bugs.winehq.org/attachment.cgi?id=36256) updated valgrind log
https://bugs.winehq.org/show_bug.cgi?id=26049
--- Comment #6 from Austin English austinenglish@gmail.com --- ==21116== 36 bytes in 1 blocks are definitely lost in loss record 261 of 702 ==21116== at 0x7BC4C6EB: notify_alloc (heap.c:255) ==21116== by 0x7BC50F2F: RtlAllocateHeap (heap.c:1716) ==21116== by 0x50AA581: WS2_AcceptEx (socket.c:2419) ==21116== by 0x4F789E8: test_AcceptEx (sock.c:6449) ==21116== by 0x4F7FD8E: func_sock (sock.c:7729) ==21116== by 0x4F80BB1: run_test (test.h:584) ==21116== by 0x4F80FA0: main (test.h:654) ==21116==
in wine-1.7.19-70-gd6a59f7
https://bugs.winehq.org/show_bug.cgi?id=26049
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |valgrind
https://bugs.winehq.org/show_bug.cgi?id=26049
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #7 from joaopa jeremielapuree@yahoo.fr --- Created attachment 67746 --> https://bugs.winehq.org/attachment.cgi?id=67746 console output with valgrind --trace-children=yes --leak-check=full --show-leak-kinds=all
Looks like the bug is fixed with wine-5.13. Can an administrator close this bug as FIXED?