I haven't been able to determin the cause. But I have run it under dbx to find
out where it's coring and whats causing the core. Going from qsort() in psy.c to
apsort() in the same file some how corrupts the pointers. I'm not sure if this
is a vorbis thing or a sun thing. But considering i've managed to encode one
file sucessfully, i think it's something to do with the contents of the wav files.
(dbx) run -q 5 /tmp/test.wav
Running: oggenc -q 5 /tmp/test.wav
(process id 16546)
Opening with wav module: WAV file reader
Encoding "/tmp/test.wav" to
"/tmp/test.ogg"
at quality 5.00
signal SEGV (no mapping at the fault address) in apsort at line 953 in file "psy.c"
953 if(fabs(**(float **)a)>fabs(**(float **)b)) return -1;
(dbx) where
=>[1] apsort(a = 0xffbfedec, b = 0xffbfedf4), line 953 in "psy.c"
[2] qsort(0xffbfedf0, 0x8, 0x4, 0xff35f0a0, 0xffbfe998, 0x80), at 0xff0cb60c
[3] _vp_noise_normalize_sort(p = 0x8f860, magnitudes = 0xccaa0, sortedindex =
0xffbfeea0), line 994 in "psy.c"
[4] mapping0_forward(vb = 0xffbff4b8), line 532 in "mapping0.c"
[5] vorbis_analysis(vb = 0xffbff4b8, op = (nil)), line 48 in "analysis.c"
[6] oe_encode(0xffbff6f0, 0x1c, 0x400, 0x33f40, 0x37888, 0xc00), at 0x16f20
[7] main(0xffffffff, 0x0, 0x32280, 0x33f20, 0x33f40, 0x34a80), at 0x13844
(dbx) print a,b,*a,*b
a = 0xffbfedec
b = 0xffbfedf4
*a = (void)
*b = (void)
(dbx) up
0xff0cb60c: qsort+0x00f4: jmpl %l1, %o7
(dbx) up
Current function is _vp_noise_normalize_sort
994 qsort(work,partition,sizeof(*work),apsort);
(dbx) print partition
partition = 8
(dbx) for i in 0 1 2 3 4 5 6 7; do print *work[$i];done
*work[0] = 0.0
*work[1] = 0.0
*work[2] = 0.0
*work[3] = 0.0
*work[4] = 0.0
*work[5] = 0.0
*work[6] = 0.0
*work[7] = 0.0
(dbx)