Bug 24322 - Segmentation fault or out of memory compiling FFMpeg snow.c at -O3 for ARM
Summary: Segmentation fault or out of memory compiling FFMpeg snow.c at -O3 for ARM
Status: RESOLVED DUPLICATE of bug 23870
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 3.4.4
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-12 01:56 UTC by Flash Sheridan
Modified: 2005-10-12 13:42 UTC (History)
2 users (show)

See Also:
Host:
Target: arm-softfloat-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
110517_snow_min.i (4.66 KB, text/plain)
2005-10-12 01:57 UTC, Flash Sheridan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Flash Sheridan 2005-10-12 01:56:04 UTC
Compiling the file snow.c from the ffmpeg project (http://ffmpeg.sourceforge.net), or a Delta-reduced pre-processed version of it (which I'll attach) causes either a segmentation fault or out of memory condition.  This was originally noticed by Eric Moon with arm-softfloat-linux-gnu/gcc-3.4.1-glibc-2.3.3; on his Ubuntu 5.04 machine, he gets a segmentation fault.  On my Ubuntu machine, that compiler instead runs out of memory, killing my window manager, so I was unable to get much information about 3.4.1.  The gcc-3.4.4-glibc-2.3.5/arm-softfloat-linux-gnu build behaves similarly; session below.
    The CodeSourcery build of 3.4.3, however, does give me a a useful error message:

../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i: In function `ff_spatial_idwt_init':
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i:406: internal compiler error: Segmentation fault

    Does not happen with native x86 versions 3.4.3 with checking enabled, 4.0.1 with checking = all, 3.3.5 (Debian 1:3.3.5-8ubuntu2), or Macintosh 4.0.0 (Apple build 4061).
    This sounds like bug 19592, but that was reported against native 4.0.0, and was supposedly irreproducible.
    Here's the gcc-3.4.4-glibc-2.3.5/arm-softfloat-linux-gnu session:

113> nice /opt/crosstool/gcc-3.4.4-glibc-2.3.5/arm-softfloat-linux-gnu/bin/arm-softfloat-linux-gnu-gcc -v -c -O3 ../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.iReading specs from /home/opt/crosstool/gcc-3.4.4-glibc-2.3.5/arm-softfloat-linux-gnu/bin/../lib/gcc/arm-softfloat-linux-gnu/3.4.4/specs
Configured with: /home/flash/projects/open-source/crosstool/main/dist/build/arm-softfloat-linux-gnu/gcc-3.4.4-glibc-2.3.5/gcc-3.4.4/configure --target=arm-softfloat-linux-gnu --host=i686-host_pc-linux-gnu --prefix=/opt/crosstool/gcc-3.4.4-glibc-2.3.5/arm-softfloat-linux-gnu --with-float=soft --with-headers=/opt/crosstool/gcc-3.4.4-glibc-2.3.5/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/include --with-local-prefix=/opt/crosstool/gcc-3.4.4-glibc-2.3.5/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 --enable-long-long
Thread model: posix
gcc version 3.4.4
 /home/opt/crosstool/gcc-3.4.4-glibc-2.3.5/arm-softfloat-linux-gnu/bin/../libexec/gcc/arm-softfloat-linux-gnu/3.4.4/cc1 -fpreprocessed ../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i -quiet -dumpbase 110517_snow_min.i -msoft-float -auxbase 110517_snow_min -O3 -version -o /tmp/cc45i7SF.s
GNU C version 3.4.4 (arm-softfloat-linux-gnu)
        compiled by GNU C version 3.3.5 (Debian 1:3.3.5-8ubuntu2).
GGC heuristics: --param ggc-min-expand=90 --param ggc-min-heapsize=113332
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i:7: warning: `__transparent_union__' attribute ignored
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i:40: warning: "struct __gconv_step_data" declared inside parameter list
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i:40: warning: its scope is only this definition or declaration, which is probably not what you want
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i:40: warning: "struct __gconv_step" declared inside parameter list
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i:42: warning: "struct __gconv_step" declared inside parameter list
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i: In function `predict_slice_buffered':
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i:596: warning: passing arg 6 of `add_yblock_buffered' discards qualifiers from pointer target type
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i: In function `dequantize_slice_buffered':
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i:644: warning: pointer/integer type mismatch in conditional expression

<killed manually just before running out of memory>


Here's the CodeSourcery 3.4.3/arm-none-linux-gnueabi 2005-q1 session:

116> /opt/crosstool/arm-none-linux-gnueabi/gnu-csl-arm-2005Q1B/bin/arm-none-linux-gnueabi-gcc -v -c -O3 ../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i
Reading specs from /home/opt/crosstool/arm-none-linux-gnueabi/gnu-csl-arm-2005Q1B/bin/../lib/gcc/arm-none-linux-gnueabi/3.4.3/specs
Configured with: /scratch/paul/2005-q1b/src/gcc-csl-arm/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-languages=c,c++ --disable-checking --enable-shared --enable-threads --disable-libmudflap --with-gnu-as --with-gnu-ld --prefix=/opt/codesourcery --enable-symvers=gnu --enable-__cxa_atexit --with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc --enable-threads --enable-shared
Thread model: posix
gcc version 3.4.3 (release) (CodeSourcery ARM Q1B 2005)
 /home/opt/crosstool/arm-none-linux-gnueabi/gnu-csl-arm-2005Q1B/bin/../libexec/gcc/arm-none-linux-gnueabi/3.4.3/cc1 -fpreprocessed ../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i -quiet -dumpbase 110517_snow_min.i -auxbase 110517_snow_min -O3 -version -o /tmp/cc6Nmeji.s
GNU C version 3.4.3 (release) (CodeSourcery ARM Q1B 2005) (arm-none-linux-gnueabi)
        compiled by GNU C version 3.2 20020903 (Red Hat Linux 8.0 3.2-7).
GGC heuristics: --param ggc-min-expand=90 --param ggc-min-heapsize=113332
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i:7: warning: `__transparent_union__' attribute ignored
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i:40: warning: "struct __gconv_step_data" declared inside parameter list
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i:40: warning: its scope is only this definition or declaration, which is probably not what you want
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i:40: warning: "struct __gconv_step" declared inside parameter list
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i:42: warning: "struct __gconv_step" declared inside parameter list
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i: In function `predict_slice_buffered':
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i:596: warning: passing arg 6 of `add_yblock_buffered' discards qualifiers from pointer target type
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i: In function `dequantize_slice_buffered':
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i:644: warning: pointer/integer type mismatch in conditional expression
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i: In function `ff_spatial_idwt_init':
../cpp/bugfiles/GCC_bugfiles/noerror/warn/110517_snow_min.i:406: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
Send email to arm-gnu@codesourcery.com for instructions.
Comment 1 Flash Sheridan 2005-10-12 01:57:21 UTC
Created attachment 9974 [details]
110517_snow_min.i

PalmSource bug 110517.
Comment 2 Richard Earnshaw 2005-10-12 13:42:45 UTC
Stack backstrace suggests that this is probably a duplicate of PR23870.

*** This bug has been marked as a duplicate of 23870 ***