[FFmpeg-devel] [PATCH 2/2] Use gcc/clang builtins for av_sat_(add|sub)_64_c if available.

Dale Curtis dalecurtis at chromium.org
Mon May 18 21:19:40 EEST 2020


The C versions of these functions have landed. Michael, did you intend to
land this one too?

- dale

On Thu, May 14, 2020 at 12:47 PM Dale Curtis <dalecurtis at google.com> wrote:

> Rebased.
>
> On Mon, May 4, 2020 at 11:47 AM James Almer <jamrial at gmail.com> wrote:
>
>> On 5/4/2020 3:40 PM, Dale Curtis wrote:
>> > On Mon, May 4, 2020 at 11:19 AM James Almer <jamrial at gmail.com> wrote:
>> >
>> >> On 5/4/2020 3:09 PM, Dale Curtis wrote:
>> >>> Bump. I have 5 integer overflow fuzzing issues awaiting our
>> resolution of
>> >>> this discussion. Thanks.
>> >>>
>> >>> - dale
>> >>
>> >> What's the first version of clang with support for
>> __builtin_*_overflow?
>> >> Because with your patch as is (Checking only __clang__), it's very
>> >> likely old clang builds could be broken. We have things like Clang 3 on
>> >> FATE right now.
>> >>
>> >
>> > Clang 10.0 apparently:
>> >
>> https://clang.llvm.org/docs/LanguageExtensions.html#feature-checking-macros
>> -
>> > I'm fine with limiting support to where it works though. Attached patch
>> > does that.
>> >
>> >
>> >>
>> >> Also, does clang-cl define __clang__ and these builtins? Because maybe
>> >> we could remove that check and just keep the GCC + Intel one. The
>> former
>> >> should in theory cover Clang builds that are reportedly compatible with
>> >> GCC >= 5.1
>> >>
>> >
>> > Yes, clang-cl defines __clang__ and these builtins.
>> >
>> > - dale
>>
>> Ok, if __has_builtin() works for these then this patch LGTM, but I'd
>> prefer to first hear Michael's opinion about your reply to his question.
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
>


More information about the ffmpeg-devel mailing list