[tremor] Segmentation fault on CRIS

Diego d.serafin at vodafone.it
Sat Mar 13 08:25:52 PST 2004



Hi everybody,
I'm a freshman of tremor trying to compile the decoder on an AXIS CRIS 
processor.
After configuring Tremor for xcompile on Cris (--host=cris) I had to 
modify CFLAGS line on auto-generated Makefile to make it compile 
following the CRIS gcc conventions, the line now looks like:

CFLAGS = -O2 -fsigned-char  -D_REENTRANT -g -mlinux -isystem 
/home/diego/axis/devboard_lx/target/cris-axis-linux-gnu/include

I linked the library to my test application and compiled the example 
provided with Tremor as well (make example): no warning or errors 
whatsoever.

Then I finally tried it on target:

1. put a 30 seconds Ogg Vorbis music (stereo 44100 samples per second) 
on target ram file system.

2. Tried to decode it to raw PCM file on the same FS using either the 
test program I wrote or the one provided (basically identical).

Results: after a fixed number of buffers corretly decoded the 
application exits with a Segmentation fault.

Raw pcm data is actually decoded corretly (transformed into a wav using 
sox plays ok).

Attaching the gdb, here it is the failure point:

Program received signal SIGSEGV, Segmentation fault.
0x000874ba in oggpack_look (b=0x9e484, bits=10) at bitwise.c:101
101             ret|=*ptr++<<(8-b->headbit);
(gdb)

The number of bytes processed correctly is changing with the amount of 
silence present in the file:
file1.ogg (some silence, 3.3% initial silence bytes) segfaults after 
processing 237568 bytes = 58 x 4096
file2.ogg (no silence) segfaults at 114688 = 28 x 4096

I tried to investigate the code but, honestly, I cannot at the moment 
understand very well wat's doing when crashes.

Any hint or ideas?
Ciao,
Diego.

<p><p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'tremor-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Tremor mailing list