public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Does a double Page free report "ConvertPages: Incompatible memory types", maybe we could do better.
@ 2017-08-10  1:03 Andrew Fish
  2017-08-10  1:33 ` Zeng, Star
  2017-08-10 10:19 ` Laszlo Ersek
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew Fish @ 2017-08-10  1:03 UTC (permalink / raw)
  To: edk2-devel

It looks to me like if you Free pages, after you free pages you hit this DEBUG message. 


https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Core/Dxe/Mem/Page.c#L790

      if (!(NewType == EfiConventionalMemory ? 1 : 0) ^ (Entry->Type == EfiConventionalMemory ? 1 : 0)) {
        DEBUG ((DEBUG_ERROR | DEBUG_PAGE, "ConvertPages: Incompatible memory types\n"));
        return EFI_NOT_FOUND;
      }

I'm not sure I've thought out all the paths, but would it make more sense if you are trying to convert EfiConventionalMemory to EfiConventionalMemory that you are trying to free pages that are already freed. That is not very obvious from the above DEBUG print.  Could there be an if in the error path to print a better DEBUG message for a free pages bug? 

Also to be pedantic the function change names to: CoreConvertPagesEx(). 

Thanks,


Andrew Fish





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-10 20:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-10  1:03 Does a double Page free report "ConvertPages: Incompatible memory types", maybe we could do better Andrew Fish
2017-08-10  1:33 ` Zeng, Star
2017-08-10 20:53   ` Andrew Fish
2017-08-10 10:19 ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox