[FFmpeg-trac] #4727(undetermined:open): Undefined behaviors in ffmpeg

FFmpeg trac at avcodec.org
Sat Oct 10 03:37:25 CEST 2015


#4727: Undefined behaviors in ffmpeg
-------------------------------------+-------------------------------------
             Reporter:  xiedingbao   |                    Owner:
                 Type:  defect       |                   Status:  open
             Priority:  normal       |                Component:
              Version:  git-master   |  undetermined
             Keywords:               |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  1
-------------------------------------+-------------------------------------

Comment (by gajjanag):

 file id 14 still triggers on gcc-usan. This is likely a bug in GCC.
 After all, the commit 053e80f6eaf8d87521fe58ea96886b6ee0bbe59d addresses
 this.
 Basically, gcc-usan can't use the FFNABS solution:

 #include <limits.h>
 #define FFNABS(a) ((a) <= 0 ? (a) : (-(a)))
 int main(void) {
     int d = INT_MIN;
     return (FFNABS(d) < -(1<<28));
 }

 fails on gcc-usan while clang-usan is fine with it.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/4727#comment:8>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list