[FFmpeg-devel] [PATCH 1/2] avutil/common: Add FFINCREASE_PTR()

Nicolas George george at nsup.org
Fri Feb 19 23:54:49 EET 2021


Andreas Rheinhardt (12021-02-19):
> It is only for NULL+0; NULL+x is a real bug after all.
> And the macro doesn't hide it; NULL+x can still be detected with all the
> typical tools (ubsan) to detect NULL+x. Doing it this way has the
> advantage of allowing the compiler to optimize the branch away (GCC does
> it).

Oh, I had read the macro the wrong way. This version is cleverer.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210219/08f5ed4e/attachment.sig>


More information about the ffmpeg-devel mailing list