[FFmpeg-trac] #3540(avutil:new): The asm inline code in function libavcodec/dirac_arith.h:dirac_get_arith_bit with PIC and stack-check build options

FFmpeg trac at avcodec.org
Wed Apr 9 12:18:36 CEST 2014


#3540: The asm inline code in function
libavcodec/dirac_arith.h:dirac_get_arith_bit with PIC and stack-check build
options
----------------------------------+----------------------------------
             Reporter:  alucowie  |                    Owner:
                 Type:  defect    |                   Status:  new
             Priority:  normal    |                Component:  avutil
              Version:  1.2.6     |               Resolution:
             Keywords:            |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+----------------------------------

Comment (by cehoyos):

 Afaict, the patch is not correct:
 I use the following configure line:
 {{{
 $ configure --cc='cc -m32' --disable-optimizations --enable-pic
 }}}
 Now neither EBP nor EBX are available:
 {{{
 $ grep HAVE_EB config.h
 #define HAVE_EBP_AVAILABLE 0
 #define HAVE_EBX_AVAILABLE 0
 }}}
 This means that HAVE_6REGS is false:
 {{{
 $ grep HAVE_6REGS libavutil/x86/asm.h
 #define HAVE_6REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE ||
 HAVE_EBP_AVAILABLE))
 }}}
 But compilation of libavcodec/diracdec.o still succeeds:
 {{{
 $ make V=1 libavcodec/diracdec.o
 cc -m32 -I. -I./ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64
 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC
 -DHAVE_AV_CONFIG_H -std=c99 -fPIC -pthread -D_GNU_SOURCE=1 -D_REENTRANT
 -I/usr/include/SDL -g -Wdeclaration-after-statement -Wall -Wdisabled-
 optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-
 limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-
 prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-
 length -Wno-pointer-sign  -fno-math-errno -fno-signed-zeros -fno-tree-
 vectorize -Werror=implicit-function-declaration -Werror=missing-prototypes
 -Werror=return-type -Werror=vla -Wno-maybe-uninitialized  -MMD -MF
 libavcodec/diracdec.d -MT libavcodec/diracdec.o -c -o
 libavcodec/diracdec.o libavcodec/diracdec.c
 libavcodec/diracdec.c: In function ‘dirac_decode_picture_header’:
 libavcodec/diracdec.c:1716:5: warning: ‘reference’ is deprecated (declared
 at ./libavutil/frame.h:253) [-Wdeprecated-declarations]
 libavcodec/diracdec.c:1722:17: warning: ‘reference’ is deprecated
 (declared at ./libavutil/frame.h:253) [-Wdeprecated-declarations]
 libavcodec/diracdec.c:1730:13: warning: ‘reference’ is deprecated
 (declared at ./libavutil/frame.h:253) [-Wdeprecated-declarations]
 libavcodec/diracdec.c: In function ‘get_delayed_pic’:
 libavcodec/diracdec.c:1764:9: warning: ‘reference’ is deprecated (declared
 at ./libavutil/frame.h:253) [-Wdeprecated-declarations]
 libavcodec/diracdec.c: In function ‘dirac_decode_data_unit’:
 libavcodec/diracdec.c:1846:9: warning: ‘reference’ is deprecated (declared
 at ./libavutil/frame.h:253) [-Wdeprecated-declarations]
 libavcodec/diracdec.c: In function ‘dirac_decode_frame’:
 libavcodec/diracdec.c:1879:9: warning: ‘reference’ is deprecated (declared
 at ./libavutil/frame.h:253) [-Wdeprecated-declarations]
 libavcodec/diracdec.c:1928:9: warning: ‘reference’ is deprecated (declared
 at ./libavutil/frame.h:253) [-Wdeprecated-declarations]
 libavcodec/diracdec.c:1945:13: warning: ‘reference’ is deprecated
 (declared at ./libavutil/frame.h:253) [-Wdeprecated-declarations]
 }}}
 Tested with current FFmpeg git head and vanilla gcc 4.4.6, vanilla gcc
 4.7.2 and vanilla gcc 4.8.2 (and gcc 2.95.3).

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


More information about the FFmpeg-trac mailing list