> On Dec 3, 2014, at 12:00 PM, Carsey, Jaben <jaben.car...@intel.com> wrote:
> 
> So is the ASSERT to get past an automated code checking tool warning?
>  

Which is why I’m confused, as it still seems like a subset of release builds 
would fail? Don’t you want to check the code you release to customers?

Thanks,

Andrew Fish

>  
>  
> From: Qiu, Shumin [mailto:shumin....@intel.com <mailto:shumin....@intel.com>] 
> Sent: Wednesday, December 03, 2014 4:44 AM
> To: edk2-devel@lists.sourceforge.net 
> <mailto:edk2-devel@lists.sourceforge.net>; Andrew Fish
> Subject: Re: [edk2] [Patch] ShellPkg: Add ASSERT to check pointer to avoid 
> being dereferenced
>  
> Hi Andrew,
> ASSERT is here to make sure developer will not change code to return a NULL 
> pointer. In release it has no impact as HiiGetString can always return proper 
> string back or the build will fail.
>  
> -Shumin
>  
> From: Andrew Fish [mailto:af...@apple.com <mailto:af...@apple.com>] 
> Sent: Wednesday, December 03, 2014 11:09 AM
> To: edk2-devel@lists.sourceforge.net <mailto:edk2-devel@lists.sourceforge.net>
> Subject: Re: [edk2] [Patch] ShellPkg: Add ASSERT to check pointer to avoid 
> being dereferenced
>  
>  
> On Dec 2, 2014, at 6:56 PM, Qiu, Shumin <shumin....@intel.com 
> <mailto:shumin....@intel.com>> wrote:
>  
> Hi Jaben,
> Could you help review the patch? This patch adds ‘ASSERT’ to check the 
> pointer returned from HiiGetString to avoid pointer dereferenced.
>  
>  
> Why are we adding ASSERT to check pointers. It is likely turned off in 
> release builds. ASSERTs are a debugging aid, not a robustness check. 
>  
> The shell is an application that runs on a large number of system so it 
> should handle the errors in C code, and it could also ASSERT() on a debug 
> build. 
>  
> Thanks,
>  
> Andrew Fish
>  
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Qiu Shumin <shumin....@intel.com <mailto:shumin....@intel.com>>
>  
> Thanks
> Shumin
> <UefiHandleParsingLib.c.patch>------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk_______________________________________________
>  
> <http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk_______________________________________________>
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net <mailto:edk2-devel@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/edk2-devel 
> <https://lists.sourceforge.net/lists/listinfo/edk2-devel>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to