On Mon, Jan 6, 2020 at 10:43 AM, Vitaly Cheptsov wrote:

> 
> My original suggestion was to remove the assertions entirely, but several
> people here said that they use them to verify usage errors when handling
> trusted data. This makes good sense to me, so we suggest to support both
> cases by introducing a PCD in this patch.

I strongly agree with Vitaly.
These asserts cause more trouble than help.  The asserts cause the caller to 
implement the same checks as the functions and thus make the functional checks 
useless overhead and complicate the calling code.  These functions are in a 
base library used in hundreds of unique places and thus should not make 
assumptions about how to handle errors.  Since they have the ability to and 
must return error codes (since asserts are generally off in production) this 
code should rely on the caller to handle the error appropriately.

thanks
Sean

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#52944): https://edk2.groups.io/g/devel/message/52944
Mute This Topic: https://groups.io/mt/69401948/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to