[vsipl++] [patch] Fix for generic pwarp
Stefan Seefeld
stefan at codesourcery.com
Thu Jan 10 05:14:40 UTC 2008
Jules Bergmann wrote:
> Stefan,
>
> This patch attempts to fix the generic pwarp impl so that it doesn't
> access memory past the end of the input image.
>
> Can you give a spin on windows to see if it fixes the segfault?
Unfortunately it still fails.
Luckily, though, I have been able to reproduce the failure under Linux,
using ElectricFence, and it seems to be the exact same place as on
Windows, at least if I trust the debugger(s):
pwarp_gen.hpp:237
In line 232:
p = p_in + v0*in_stride_0 + u0;
becomes
p_in + 511 * 512 + 503;
(which is still legal, as the block size is 512x512) but then in line
237 we have
z11 = *(p + in_stride_0 + 1)
which is
p + 512 + 1
i.e. we are dereferencing the block at index (v0+1)*in_stride_0 + u0
(i.e. 512*512 + something) which is clearly too big. I don't immediately
see where the failure is, and so I'm sending this out without a fix. May
be someone beats me to it <wink/>.
Thanks,
Stefan
--
Stefan Seefeld
CodeSourcery
stefan at codesourcery.com
(650) 331-3385 x718
More information about the vsipl++
mailing list