[MPlayer-dev-eng] [PATCH] altivec fixes, part 1: alignment

Alan Curry pacman at theworld.com
Mon Feb 6 22:09:38 CET 2006


Michael Niedermayer writes the following:
>
>Hi
>
>On Mon, Feb 06, 2006 at 05:09:44PM +0100, Michael Niedermayer wrote:
>> Hi
>> 
>> On Mon, Feb 06, 2006 at 01:27:02AM -0500, Alan Curry wrote:
>> [...]
>> > -  vYCoeffsBank = malloc (sizeof (vector signed short)*lumFilterSize*dstW);
>> > -  vCCoeffsBank = malloc (sizeof (vector signed short)*chrFilterSize*dstW);
>> > +  vYCoeffsBank = memalign (16, sizeof (vector signed short)*lumFilterSize*c->dstH);
>> > +  vCCoeffsBank = memalign (16, sizeof (vector signed short)*chrFilterSize*c->dstH);
>> 
>> wrong, rejected
>
>reason: it will segfault 3 lines later due to writing into unallocated memory

As opposed to the current version, which can segfault due to reading
unallocated memory after vLumFilter. Oh well, you're right. I messed up the
order of patches. If everyone ignores these and I'll try again, with the
alignment patch last (not that it needs to be last, but it will be harder for
me to screw up that way)




More information about the MPlayer-dev-eng mailing list