Re: [edk2] FreePool crashes the system when called with a NULL pointer

2013-09-18 Thread Andrew Fish
he moment the first access attempt happens. > This is doable, buy there needs to be a way to turn it off if you launch a CSM. > Eugene > > From: Ryan Harkin [mailto:ryan.har...@linaro.org] > Sent: Wednesday, September 18, 2013 12:37 AM > To: edk2-devel@lists.sourceforge.

Re: [edk2] FreePool crashes the system when called with a NULL pointer

2013-09-18 Thread Cohen, Eugene
s zero and generate exceptions at the moment the first access attempt happens. Eugene From: Ryan Harkin [mailto:ryan.har...@linaro.org] Sent: Wednesday, September 18, 2013 12:37 AM To: edk2-devel@lists.sourceforge.net Subject: Re: [edk2] FreePool crashes the system when called with a NULL pointer

Re: [edk2] FreePool crashes the system when called with a NULL pointer

2013-09-17 Thread Ryan Harkin
On 17 September 2013 16:52, Andrew Fish wrote: > > On Sep 16, 2013, at 11:36 PM, Ryan Harkin wrote: > > Hi, > > Tracking down a crash I am seeing shows that I am effectively calling > FreePool() with a NULL pointer. The system then ASSERTS and hangs. > > I've noticed various seemingly "random"

Re: [edk2] FreePool crashes the system when called with a NULL pointer

2013-09-17 Thread Andrew Fish
On Sep 16, 2013, at 11:36 PM, Ryan Harkin wrote: > Hi, > > Tracking down a crash I am seeing shows that I am effectively calling > FreePool() with a NULL pointer. The system then ASSERTS and hangs. > > I've noticed various seemingly "random" asserts like this before and suspect > it may be

Re: [edk2] FreePool crashes the system when called with a NULL pointer

2013-09-17 Thread Andrew Fish
On Sep 17, 2013, at 2:55 AM, Laszlo Ersek wrote: > On 09/17/13 08:36, Ryan Harkin wrote: > >> I think FreePool(NULL) should just return without reporting an error. > > I agree that it could simplify some error/exit paths. > > It may not match the general "UEFI interface style" though. In my

Re: [edk2] FreePool crashes the system when called with a NULL pointer

2013-09-17 Thread Andrew Fish
On Sep 16, 2013, at 11:36 PM, Ryan Harkin wrote: > Hi, > > Tracking down a crash I am seeing shows that I am effectively calling > FreePool() with a NULL pointer. The system then ASSERTS and hangs. > > I've noticed various seemingly "random" asserts like this before and suspect > it may be

Re: [edk2] FreePool crashes the system when called with a NULL pointer

2013-09-17 Thread Laszlo Ersek
On 09/17/13 08:36, Ryan Harkin wrote: > I think FreePool(NULL) should just return without reporting an error. I agree that it could simplify some error/exit paths. It may not match the general "UEFI interface style" though. In my experience only pointers to optional parameters may be NULL, and F

[edk2] FreePool crashes the system when called with a NULL pointer

2013-09-16 Thread Ryan Harkin
Hi, Tracking down a crash I am seeing shows that I am effectively calling FreePool() with a NULL pointer. The system then ASSERTS and hangs. I've noticed various seemingly "random" asserts like this before and suspect it may be related. Of course, the assert output never helps track down the cu