<BR><BR><B><I>Josh Coalson <xflac@yahoo.com></I></B> wrote: <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"> <div>--- Tom Goetze <TGOETZE@YAHOO.COM>wrote:<BR>> doing "make check" on flac-1.1.2, I get a segmentation fault <BR>> <BR>> ././test_metaflac.sh: line 51: 17370 Segmentation fault flac<BR>> $*<BR>> <BR>> My linux distribution is a linuxfromscratch 6.1.1<BR>> I built flac using blfs 6.1 directions:<BR><BR>> gcc version 3.4.3<BR><BR>hmm, two things would help. first change the first line of<BR>test_metaflac.sh to<BR><BR>#!/bin/sh -x<BR><BR>when you run the script you will see the exact invocation of flac<BR>before the crash. if you send be the FLAC file, that might help.<BR>also, if you can run the same command in gdb and get a backtrace<BR>that would be another clue.<BR><BR>Josh<BR><BR></div></BLOCKQUOTE> <div>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. </div> <div> </div> <div>src/flac/main.c: 1730 retval = flac__decode_wav(infilename, option_values.test_only? 0 : outfilename, option_values.analyze, option_values.aopts, options);</div> <div> </div> <div> </div> <div>Details below:</div> <div> </div> <div>(gdb) run<BR>Starting program: /home/tom/sources/flac-1.1.2/src/flac/.libs/lt-flac --silent --test metaflac.flac</div> <div>Breakpoint 1, DecoderSession_process (d=0xbffff530) at decode.c:500<BR>500 if(flac__utils_fwrite("\000", 1, 1, d->fout) != 1) {<BR>(gdb) print d<BR>$1 = (DecoderSession *) 0xbffff530<BR>(gdb) print d->fout<BR>$2 = (FILE *)
0x0<BR>(gdb) n</div> <div>Program received signal SIGSEGV, Segmentation fault.<BR>0xb7ea7044 in fwrite () from /lib/libc.so.6<BR>(gdb) bt<BR>#0 0xb7ea7044 in fwrite () from /lib/libc.so.6<BR>#1 0x0804ef09 in DecoderSession_process (d=0xbffff530) at decode.c:500<BR>#2 0x08051275 in flac__decode_wav (infilename=0x8341978 "metaflac.flac", outfilename=0x0, analysis_mode=0, aopts=<BR> {do_residual_text = 0, do_residual_gnuplot = 1}, options=<BR> {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<BR>#3 0x0805a507 in decode_file (infilename=0x8341978 "metaflac.flac") at main.c:1730<BR>#4 0x0805c241 in do_it () at main.c:486<BR>#5 0x0805ca7b in main (argc=4, argv=0xbffffa34) at main.c:284</div> <div><BR>And output of adding -x:</div> <div> </div> <div>options: -P 4096 -b 1152 -l 0 -q 0 -r 2,2 -V<BR>sh: Verify OK, wrote 554232 bytes, ratio=0.967<BR>+ chmod +w metaflac.flac<BR>+ check_flac<BR>+ run_flac --silent --test metaflac.flac<BR>+ '[' xno = xyes ']'<BR>+ flac --silent --test metaflac.flac<BR>././test_metaflac.sh: line 51: 7636 Segmentation fault flac $*<BR>+ die 'ERROR in metaflac.flac'<BR>+ echo ERROR in metaflac.flac<BR>ERROR in metaflac.flac<BR>+ exit 1<BR>FAIL: ./test_metaflac.sh</div>
<div> </div> <div>Would it change functionality to add another condition about non-null outputfile to the flac__decode_wav routine on decode.c:500?</div> <div> </div> <div>Tom</div><p> 
        
        
                <hr size=1>Want to be your own boss? Learn how on <a href="http://us.rd.yahoo.com/evt=41244/*http://smallbusiness.yahoo.com/r-index"> Yahoo! Small Business.</a>