Re: [AD] kcm audio segfault

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2009-08-02, Trent Gamblin <trent@xxxxxxxxxx> wrote:
> I tried tracking this one down myself but I'm having problems. I've attached the example, it
> doesn't really matter what oggs you use but if you want I can upload them somewhere if you want to
> test. This simple example causes a segfault. There seems to be some sort of memory corruption
> going on somewhere. I've tested it on Wiz (OSS) and OS X (OpenAL) and it fails on both.

Under valgrind:

==15918== Thread 3:
==15918== Invalid read of size 2
==15918==    at 0x402AEFA: linear_spl32 (kcm_mixer.c:356)
==15918==    by 0x402ACD3: read_to_mixer_linear32 (kcm_mixer.c:483)
==15918==    by 0x402B52B: _al_kcm_mixer_read (kcm_mixer.c:544)
==15918==    by 0x402E100: _al_voice_update (kcm_voice.c:45)
==15918==    by 0x403090D: oss_update (oss.c:454)
==15918==    by 0x4076445: thread_func_trampoline (threads.c:77)
==15918==    by 0x40817F8: thread_proc_trampoline (uxthread.c:36)
==15918==    by 0x4177368: start_thread (in /lib/libpthread-2.7.so)
==15918==    by 0x4785CFD: clone (in /lib/libc-2.7.so)
==15918==  Address 0x48c6c70 is 22,528 bytes inside a block of size 60,674 free'd
==15918==    at 0x40235C9: free (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==15918==    by 0x402C336: al_destroy_sample (kcm_sample.c:127)
==15918==    by 0x80482C3: main (test.cpp:22)
==15918== 
==15918== Invalid read of size 2
==15918==    at 0x402AF21: linear_spl32 (kcm_mixer.c:357)
==15918==    by 0x402ACD3: read_to_mixer_linear32 (kcm_mixer.c:483)
==15918==    by 0x402B52B: _al_kcm_mixer_read (kcm_mixer.c:544)
==15918==    by 0x402E100: _al_voice_update (kcm_voice.c:45)
==15918==    by 0x403090D: oss_update (oss.c:454)
==15918==    by 0x4076445: thread_func_trampoline (threads.c:77)
==15918==    by 0x40817F8: thread_proc_trampoline (uxthread.c:36)
==15918==    by 0x4177368: start_thread (in /lib/libpthread-2.7.so)
==15918==    by 0x4785CFD: clone (in /lib/libc-2.7.so)
==15918==  Address 0x48c6c72 is 22,530 bytes inside a block of size 60,674 free'd
==15918==    at 0x40235C9: free (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==15918==    by 0x402C336: al_destroy_sample (kcm_sample.c:127)
==15918==    by 0x80482C3: main (test.cpp:22)
==15918== 

Which seems to be a simple case of the sample still being played
when al_destroy_sample is called.  Obviously that should be fixed
but is there another problem you had in mind?

Peter




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/