dk / Prima

prima.eu.org
Other
108 stars 27 forks source link

Leak at exit #73

Closed jddurand closed 1 year ago

jddurand commented 1 year ago

Minor bug, but may be good to investigate, observed doing perl -I blib\lib -I blib\arch t\Object\TextWrap.t :

Error #2: POSSIBLE LEAK 200 direct bytes 0x08001a00-0x08001ac8 + 0 indirect bytes
# 0 replace_RtlAllocateHeap                [d:\a\drmemory\drmemory\common\alloc_replace.c:3772]
# 1 gdi32full.dll!CreateFontIndirectExW   +0xd9     (0x7615fcea <gdi32full.dll+0x4fcea>)
# 2 gdi32full.dll!CreateFontIndirectA     +0x48     (0x76145e19 <gdi32full.dll+0x35e19>)
# 3 GDI32.dll!CreateFontIndirectA         +0x1e     (0x75c24d0f <GDI32.dll+0x4d0f>)
# 4 Prima.dll!window_subsystem_init        [C:\Users\jddfr\git\Prima\win32\global.c:286]
# 5 Prima.dll!Prima_init                   [C:\Users\jddfr\git\Prima\api\boot.c:130]
# 6 perl537.dll!Perl_pp_entersub           [C:\Users\jddfr\git\perlbuildwindows-build\perl-core-prefix\src\perl-core\pp_hot.c:5457]
# 7 perl537.dll!Perl_runops_standard       [C:\Users\jddfr\git\perlbuildwindows-build\perl-core-prefix\src\perl-core\run.c:41]
# 8 perl537.dll!Perl_call_sv               [C:\Users\jddfr\git\perlbuildwindows-build\perl-core-prefix\src\perl-core\win32\perl.c:3148]
# 9 perl537.dll!Perl_call_sv               [C:\Users\jddfr\git\perlbuildwindows-build\perl-core-prefix\src\perl-core\win32\perl.c:3143]
#10 perl537.dll!Perl_call_list             [C:\Users\jddfr\git\perlbuildwindows-build\perl-core-prefix\src\perl-core\win32\perl.c:5222]
#11 perl537.dll!S_process_special_blocks   [C:\Users\jddfr\git\perlbuildwindows-build\perl-core-prefix\src\perl-core\win32\op.c:10860]
dk commented 1 year ago

I am sure this is internal bug, if ever, in gdi32.dll. I mean "if ever" because i don't see a problem in static one-time allocations that aren't freed. Especially just 200b. Also i don't think it is possible to do anything about this bug - CreateFontIndirect reads a struct and returns a HFONT which is not even a pointer.

jddurand commented 1 year ago

Yes, I understand. Strange but ok, this is minor ;) Thanks.