Tom Goetze
2006-Aug-28 22:41 UTC
[Flac-dev] test_metaflac fails in make check for flac 1.1.2 after --add-padding is performed
doing "make check" on flac-1.1.2, I get a segmentation fault ././test_metaflac.sh: line 51: 17370 Segmentation fault flac $* when running this portion of the test/test_metaflac.sh script: (set -x && run_metaflac --preserve-modtime --add-padding=12345 $flacfile) check_exit check_flac <---------------- where the segfault happens All other tests in 'make check' passed. I commented out this portion of the test script and got a failure in the next line. I also tried adding --dont-use-padding (since that was reported to be a previous workaround), but it still failed. My linux distribution is a linuxfromscratch 6.1.1 I built flac using blfs 6.1 directions: LIBS=-lm ./configure --prefix=/usr && make Only thing interesting in the make output was the warnings about inlining failures, in bitbuffer.c and md5.c ~/sources/flac-1.1.2$ gcc -v Reading specs from /usr/lib/gcc/i686-pc-linux-gn/3.4.3 Configured with: ../gcc-3.4.3/configure --prefix=/usr --libexecdir=/usr/lib --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ Thread model: posix gcc version 3.4.3 No XMMS support was built. I didn't see anything immediately related in the bug list, but just in case I posted to the dev mailing list first. Anything I can try/report on to help narrow this issue down? Tom --------------------------------- Stay in the know. Pulse on the new Yahoo.com. Check it out. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/flac-dev/attachments/20060828/44020e9a/attachment.htm
Josh Coalson
2006-Aug-29 13:06 UTC
[Flac-dev] test_metaflac fails in make check for flac 1.1.2 after --add-padding is performed
--- Tom Goetze <tgoetze@yahoo.com> wrote:> doing "make check" on flac-1.1.2, I get a segmentation fault > > ././test_metaflac.sh: line 51: 17370 Segmentation fault flac > $* > > when running this portion of the test/test_metaflac.sh script: > > (set -x && run_metaflac --preserve-modtime --add-padding=12345 > $flacfile) > check_exit > check_flac <---------------- where the segfault > happens > > All other tests in 'make check' passed. I commented out this portion > of the test script and got a failure in the next line. I also tried > adding --dont-use-padding (since that was reported to be a previous > workaround), but it still failed. > > > My linux distribution is a linuxfromscratch 6.1.1 > I built flac using blfs 6.1 directions: > > LIBS=-lm ./configure --prefix=/usr && make > Only thing interesting in the make output was the warnings about > inlining failures, in bitbuffer.c and md5.c > > ~/sources/flac-1.1.2$ gcc -v > Reading specs from /usr/lib/gcc/i686-pc-linux-gn/3.4.3 > Configured with: ../gcc-3.4.3/configure --prefix=/usr > --libexecdir=/usr/lib --enable-shared --enable-threads=posix > --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ > Thread model: posix > gcc version 3.4.3 > > No XMMS support was built. > > I didn't see anything immediately related in the bug list, but just > in case I posted to the dev mailing list first. > > Anything I can try/report on to help narrow this issue down?hmm, two things would help. first change the first line of test_metaflac.sh to #!/bin/sh -x when you run the script you will see the exact invocation of flac before the crash. if you send be the FLAC file, that might help. also, if you can run the same command in gdb and get a backtrace that would be another clue. Josh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Tom Goetze
2006-Aug-30 00:01 UTC
[Flac-dev] test_metaflac fails in make check for flac 1.1.2 after --add-padding is performed
Josh Coalson <xflac@yahoo.com> wrote: --- Tom Goetze wrote:> doing "make check" on flac-1.1.2, I get a segmentation fault > > ././test_metaflac.sh: line 51: 17370 Segmentation fault flac > $* > > My linux distribution is a linuxfromscratch 6.1.1 > I built flac using blfs 6.1 directions:> gcc version 3.4.3hmm, two things would help. first change the first line of test_metaflac.sh to #!/bin/sh -x when you run the script you will see the exact invocation of flac before the crash. if you send be the FLAC file, that might help. also, if you can run the same command in gdb and get a backtrace that would be another clue. Josh Seems like fwrite doesn't like to write to null. However, it seems clear from the code that using --test intentionally creates no outputfile for fwrite. src/flac/main.c: 1730 retval = flac__decode_wav(infilename, option_values.test_only? 0 : outfilename, option_values.analyze, option_values.aopts, options); Details below: (gdb) run Starting program: /home/tom/sources/flac-1.1.2/src/flac/.libs/lt-flac --silent --test metaflac.flac Breakpoint 1, DecoderSession_process (d=0xbffff530) at decode.c:500 500 if(flac__utils_fwrite("\000", 1, 1, d->fout) != 1) { (gdb) print d $1 = (DecoderSession *) 0xbffff530 (gdb) print d->fout $2 = (FILE *) 0x0 (gdb) n Program received signal SIGSEGV, Segmentation fault. 0xb7ea7044 in fwrite () from /lib/libc.so.6 (gdb) bt #0 0xb7ea7044 in fwrite () from /lib/libc.so.6 #1 0x0804ef09 in DecoderSession_process (d=0xbffff530) at decode.c:500 #2 0x08051275 in flac__decode_wav (infilename=0x8341978 "metaflac.flac", outfilename=0x0, analysis_mode=0, aopts {do_residual_text = 0, do_residual_gnuplot = 1}, options {common = {continue_through_decode_errors = 0, replaygain_synthesis_spec = {apply = 0, use_album_gain = 1, limiter = RGSS_LIMIT__HARD, noise_shaping = NOISE_SHAPING_LOW, preamp = 0}, is_ogg = 0, use_first_serial_number = 1, serial_number = 0, skip_specification = {is_relative = 0, value_is_samples = 1, value = {seconds = 0, samples = 0}}, until_specification = {is_relative = 0, value_is_samples = 1, value = {seconds = 0, samples = 0}}, has_cue_specification = 0, cue_specification = {has_start_point = -1207954168, has_end_point = 0, start_track = 3086395392, start_index = 40, end_track = 3086395392, end_index = 3086396416}}}) at decode.c:203 #3 0x0805a507 in decode_file (infilename=0x8341978 "metaflac.flac") at main.c:1730 #4 0x0805c241 in do_it () at main.c:486 #5 0x0805ca7b in main (argc=4, argv=0xbffffa34) at main.c:284 And output of adding -x: options: -P 4096 -b 1152 -l 0 -q 0 -r 2,2 -V sh: Verify OK, wrote 554232 bytes, ratio=0.967 + chmod +w metaflac.flac + check_flac + run_flac --silent --test metaflac.flac + '[' xno = xyes ']' + flac --silent --test metaflac.flac ././test_metaflac.sh: line 51: 7636 Segmentation fault flac $* + die 'ERROR in metaflac.flac' + echo ERROR in metaflac.flac ERROR in metaflac.flac + exit 1 FAIL: ./test_metaflac.sh Would it change functionality to add another condition about non-null outputfile to the flac__decode_wav routine on decode.c:500? Tom --------------------------------- Want to be your own boss? Learn how on Yahoo! Small Business. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/flac-dev/attachments/20060830/7707efee/attachment.htm
Possibly Parallel Threads
- test_metaflac fails in make check for flac 1.1.2 after --add-padding is performed
- test_metaflac fails in make check for flac 1.1.2 after --add-padding is performed
- flac with >4GB raw still does not work (CVS)
- Patch to add buffering to decoding too
- Patch to add buffering to decoding too