On 06/29/21 15:03, Dov Murik wrote: > Out of curiousity, I wonder regarding the leak fixes -- is there a way > to see that the fix works? Is there some accounting of used pages that > we can check that decreases after the fix?
You could try a UEFI memmap comparison, but the cmdline is a pool allocation, not a page allocation, so I don't think the difference is noticeable in the UEFI memmap (the allocation is really small, so it is likely satisfied from one of the preallocated "bins"). However, in DEBUG and NOOPT builds of OVMF, FreePool() should actually wipe (part of) the freed area (with the PcdDebugClearMemoryValue=0xAF byte value), and then a double-free would trigger an assertion failure (signature missing), if I remember correctly. See the CoreFreePoolI() function in "MdeModulePkg/Core/Dxe/Mem/Pool.c", in particular the signature checks on top, and later DEBUG_CLEAR_MEMORY(). Thanks Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#77273): https://edk2.groups.io/g/devel/message/77273 Mute This Topic: https://groups.io/mt/83841915/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-