Re: [LAU] Re: [LAD] PHASEX-0.11.0 released

From: Adam Sampson <ats@email-addr-hidden>
Date: Sun Aug 12 2007 - 21:33:51 EEST

Hi,

On Wed, Aug 08, 2007 at 12:59:02AM +0300, Nedko Arnaudov wrote:
> Program received signal SIGSEGV, Segmentation fault.
> 961 tmp_1 = part.delay_buf[2 * part.delay_read_index];

I was getting this as well. After a bit of chasing, it turned out to be
a memory corruption bug: a previous bit of code was walking off the end
of the voice array and clobbering global.bps, which resulting in
part.delay_read_index having a silly value.

Here's a fix:

--- phasex-0.11.0.orig/src/callback.c 2007-07-30 10:33:36.000000000 +0100
+++ phasex-0.11.0/src/callback.c 2007-08-12 19:18:22.000000000 +0100
@@ -322,7 +322,7 @@
     /* mono keeps voice 0 active */
     if (patch->keymode != KEYMODE_POLY) {
         voice[0].active = 1;
- voice[j].allocated = 1;
+ voice[0].allocated = 1;
     }
 }

It took a while to track down because both voice and global are
statically allocated; if they'd been malloced it would have shown up in
valgrind straight away.

In the process of doing this, I also noticed that the filter_key field
in voice isn't used any more.
 
Thanks,

-- 
Adam Sampson <ats@email-addr-hidden>                         <http://offog.org/>
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Received on Mon Aug 13 00:15:02 2007

This archive was generated by hypermail 2.1.8 : Mon Aug 13 2007 - 00:15:03 EEST