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

William Weston weston at sysex.net
Tue Aug 14 04:04:41 UTC 2007


On Sun, 12 Aug 2007, Adam Sampson wrote:

> 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.

Thanks for chasing this one down!  Between this patch and the delay 
buffer size fix (only needed for oversampling), nearly everyone's 
segfault issues should be fixed.  Your patch is in phasex-0.11.1, 
available now.

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

Thanks for this one too.   Filter key was part of the voice instead 
part of the part before phasex went polyphonic.  This has been 
removed for 0.11.1.


Cheers,
--ww




More information about the Linux-audio-dev mailing list