Bug in apextract
James Turner wrote on Feb 06, 2013
Hi Mike & Frank,
I'd like to report a bug in aptrace that was causing one of our tests to crash under 2.16.
At L238 and 302 of aptrace.x, the variables "line1" and "line2" are used without being initialized. In our testing, they were starting off as 0 in the first ap_ctrace call (causing the condition on L238 to be met and the values to be set correctly), but on subsequent ap_ctrace (apall) calls they were retaining their values from the previous call, causing the routine to pass an out-of-bounds image array to center1d, in some cases leading to a numeric error. Presumably in the (majority of) remaining cases, the centring may be inaccurate.
This problem appears to be a long-standing one (eg. I see it in 2.14), but previously the uninitialized memory didn't happen to contain large values that would produce an overflow.
Thanks,
James.
I'd like to report a bug in aptrace that was causing one of our tests to crash under 2.16.
At L238 and 302 of aptrace.x, the variables "line1" and "line2" are used without being initialized. In our testing, they were starting off as 0 in the first ap_ctrace call (causing the condition on L238 to be met and the values to be set correctly), but on subsequent ap_ctrace (apall) calls they were retaining their values from the previous call, causing the routine to pass an out-of-bounds image array to center1d, in some cases leading to a numeric error. Presumably in the (majority of) remaining cases, the centring may be inaccurate.
This problem appears to be a long-standing one (eg. I see it in 2.14), but previously the uninitialized memory didn't happen to contain large values that would produce an overflow.
Thanks,
James.
Mike Fitzpatrick wrote on Feb 06, 2013
Thanks for the report, this has been fixed for the next release. The workaround of course is to use a 'flpr' between runs of the task, we can supply a patched binary if needed.
James Turner wrote on Feb 06, 2013
Great, thanks. I have a working patch for now (added a boolean to the condition to set the limits if it hasn't already been done).
Last post on Feb 06, 2013