[Bug 36136] New: oleaut32/tests/vartest.c test shows a couple leaks with valgrind
https://bugs.winehq.org/show_bug.cgi?id=36136 Bug ID: 36136 Summary: oleaut32/tests/vartest.c test shows a couple leaks with valgrind Product: Wine Version: 1.7.16 Hardware: x86 URL: https://test.winehq.org/data/7e874aed75765f3c017673178 cfd64301b7ba3ed/linux_ae-fedora64-heap/oleaut32:vartyp e.html OS: Linux Status: NEW Keywords: download, source, testcase Severity: normal Priority: P2 Component: oleaut32 Assignee: wine-bugs(a)winehq.org Reporter: austinenglish(a)gmail.com ==30829== 0 bytes in 1 blocks are definitely lost in loss record 1 of 290 ==30829== at 0x7BC4C735: notify_alloc (heap.c:255) ==30829== by 0x7BC50F79: RtlAllocateHeap (heap.c:1716) ==30829== by 0x4FE7CE0: VARIANT_CopyIRecordInfo (variant.c:717) ==30829== by 0x4FE7FE8: VariantCopy (variant.c:781) ==30829== by 0x4C7D051: test_VariantCopy (vartest.c:907) ==30829== by 0x4CD19F3: func_vartest (vartest.c:8964) ==30829== by 0x4D35F00: run_test (test.h:584) ==30829== by 0x4D362EF: main (test.h:654) ==30829== ==30829== 16 bytes in 1 blocks are definitely lost in loss record 53 of 290 ==30829== at 0x7BC4C735: notify_alloc (heap.c:255) ==30829== by 0x7BC50F79: RtlAllocateHeap (heap.c:1716) ==30829== by 0x4F980FA: alloc_bstr (oleaut.c:162) ==30829== by 0x4F98490: SysAllocStringLen (oleaut.c:324) ==30829== by 0x4CAD36B: test_VarCat (vartest.c:5952) ==30829== by 0x4CD1A70: func_vartest (vartest.c:8989) ==30829== by 0x4D35F00: run_test (test.h:584) ==30829== by 0x4D362EF: main (test.h:654) ==30829== -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36136 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |valgrind -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36136 --- Comment #1 from Nikolay Sivov <bunglehead(a)gmail.com> --- (In reply to Austin English from comment #0)
==30829== 0 bytes in 1 blocks are definitely lost in loss record 1 of 290 ==30829== at 0x7BC4C735: notify_alloc (heap.c:255) ==30829== by 0x7BC50F79: RtlAllocateHeap (heap.c:1716) ==30829== by 0x4FE7CE0: VARIANT_CopyIRecordInfo (variant.c:717) ==30829== by 0x4FE7FE8: VariantCopy (variant.c:781) ==30829== by 0x4C7D051: test_VariantCopy (vartest.c:907) ==30829== by 0x4CD19F3: func_vartest (vartest.c:8964) ==30829== by 0x4D35F00: run_test (test.h:584) ==30829== by 0x4D362EF: main (test.h:654) ==30829==
This is a result of a mess that IRecordInfo is. VariantCopy() uses source record interface pointer, then allocates a block, and does RecordCopy() on it. The problem is that block is allocated not by RecordCreate() or RecordCreateCopy() but using some generic allocator, we have tests that IRecordInfo methods are not used for that. As a result we can't deallocate it in a clean way, since allocation method is unknown. It could be possible to use HeapSize()-like way to figure out if it's generic Heap* or CoTaskMem* heap, but I vaguely remember using HeapSize() in tests was discouraged. I suggest to suppress it for now, putting this explanation or a bug reference to suppression list for the future.
==30829== 16 bytes in 1 blocks are definitely lost in loss record 53 of 290 ==30829== at 0x7BC4C735: notify_alloc (heap.c:255) ==30829== by 0x7BC50F79: RtlAllocateHeap (heap.c:1716) ==30829== by 0x4F980FA: alloc_bstr (oleaut.c:162) ==30829== by 0x4F98490: SysAllocStringLen (oleaut.c:324) ==30829== by 0x4CAD36B: test_VarCat (vartest.c:5952) ==30829== by 0x4CD1A70: func_vartest (vartest.c:8989) ==30829== by 0x4D35F00: run_test (test.h:584) ==30829== by 0x4D362EF: main (test.h:654) ==30829==
This is likely fixed with http://source.winehq.org/git/wine.git/commit/29eace89e9d6379a4ca33a8ea5d121a..., I don't see it in current log anymore. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36136 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |29eace89e9d6379a4ca33a8ea5d | |121ab7ccec99e --- Comment #2 from Austin English <austinenglish(a)gmail.com> --- (In reply to Nikolay Sivov from comment #1)
(In reply to Austin English from comment #0)
==30829== 0 bytes in 1 blocks are definitely lost in loss record 1 of 290 ==30829== at 0x7BC4C735: notify_alloc (heap.c:255) ==30829== by 0x7BC50F79: RtlAllocateHeap (heap.c:1716) ==30829== by 0x4FE7CE0: VARIANT_CopyIRecordInfo (variant.c:717) ==30829== by 0x4FE7FE8: VariantCopy (variant.c:781) ==30829== by 0x4C7D051: test_VariantCopy (vartest.c:907) ==30829== by 0x4CD19F3: func_vartest (vartest.c:8964) ==30829== by 0x4D35F00: run_test (test.h:584) ==30829== by 0x4D362EF: main (test.h:654) ==30829==
This is a result of a mess that IRecordInfo is. VariantCopy() uses source record interface pointer, then allocates a block, and does RecordCopy() on it. The problem is that block is allocated not by RecordCreate() or RecordCreateCopy() but using some generic allocator, we have tests that IRecordInfo methods are not used for that. As a result we can't deallocate it in a clean way, since allocation method is unknown. It could be possible to use HeapSize()-like way to figure out if it's generic Heap* or CoTaskMem* heap, but I vaguely remember using HeapSize() in tests was discouraged. I suggest to suppress it for now, putting this explanation or a bug reference to suppression list for the future.
Okay, thanks.
==30829== 16 bytes in 1 blocks are definitely lost in loss record 53 of 290 ==30829== at 0x7BC4C735: notify_alloc (heap.c:255) ==30829== by 0x7BC50F79: RtlAllocateHeap (heap.c:1716) ==30829== by 0x4F980FA: alloc_bstr (oleaut.c:162) ==30829== by 0x4F98490: SysAllocStringLen (oleaut.c:324) ==30829== by 0x4CAD36B: test_VarCat (vartest.c:5952) ==30829== by 0x4CD1A70: func_vartest (vartest.c:8989) ==30829== by 0x4D35F00: run_test (test.h:584) ==30829== by 0x4D362EF: main (test.h:654) ==30829==
This is likely fixed with http://source.winehq.org/git/wine.git/commit/ 29eace89e9d6379a4ca33a8ea5d121ab7ccec99e, I don't see it in current log anymore.
Me either. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36136 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #3 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 1.9.7. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org