[FFmpeg-trac] #9049(avfilter:new): astats undefined behaviour on float pcm having peaks much greater than 1.0

FFmpeg trac at avcodec.org
Mon Jan 4 19:07:43 EET 2021


#9049: astats undefined behaviour on float pcm having peaks much greater than 1.0
--------------------------------------+------------------------------------
             Reporter:  danadam       |                    Owner:
                 Type:  defect        |                   Status:  new
             Priority:  important     |                Component:  avfilter
              Version:  git-master    |               Resolution:
             Keywords:  astats crash  |               Blocked By:
             Blocking:                |  Reproduced by developer:  0
Analyzed by developer:  0             |
--------------------------------------+------------------------------------

Comment (by danadam):

 It's not like clang doesn't take advantage of UBs too:
 {{{
 ]$ cat ubtest.c
 #include <stdio.h>

 int main(int argc, char *argv[]) {
     (void)argv;
     double d = (argc > 1 ? 0.5 : 262177);
     int i = d * 8191;
     printf("%d\n", i);
 }

 ]$ clang -Wall -Wextra -pedantic -O2 ubtest.c && ./a.out
 4095
 }}}

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


More information about the FFmpeg-trac mailing list