[Pkg-octave-devel] Bug#532656: octave3.2_3.2.0-1(mips/unstable): FTBFS on mips. Segfault in regression test.

Rafael Laboissiere rafael at debian.org
Mon Jun 15 13:44:24 UTC 2009


* John W. Eaton <jwe at jweaton.org> [2009-06-15 09:31]:

> To be consistent with what is done int "set_format (double, ...)", I
> think this should be
> 
> diff --git a/src/pr-output.cc b/src/pr-output.cc
> --- a/src/pr-output.cc
> +++ b/src/pr-output.cc
> @@ -851,10 +851,10 @@
>    double r_abs = rp < 0.0 ? -rp : rp;
>    double i_abs = ip < 0.0 ? -ip : ip;
>  
> -  int r_x = r_abs == 0.0
> +  int r_x = (xisinf (rp) || xisnan (rp) || xr_abs == 0.0)
>      ? 0 : static_cast<int> (floor (log10 (r_abs) + 1.0));
>  
> -  int i_x = i_abs == 0.0
> +  int i_x = (xisinf (ip) || xisnan (ip) || i_abs == 0.0)
>      ? 0 : static_cast<int> (floor (log10 (i_abs) + 1.0));
>  
>    int x_max, x_min;
> 
> 
> Does that work for you?

Thanks for the patch.  I will try it on mips as soon as the current build
will finish (it takes forever on this kind of hardware...).

Your solution is probably better.  In my patch, the use of INT_MIN was
intended to mimic the result of floor (log10 (NaN) + 1.0) on i386 and
amd64.  But a value of 0 as you suggest will probably work fine.

Anyway, it is funny to see how long this bug lived in the code and was
just awakened by the crappy mips/mipsel architecture...

> Similar changes may be needed in other functions in case all the
> elements of a matrix are NaN, for example.

As I wrote before, if my patch makes the package build and check
correctly on mips, I think I will do the upload with it, without waiting
for a full solution to the problem.  This bug is blocking the progress on
the octave-forge packages.

Cheers,

-- 
Rafael





More information about the Pkg-octave-devel mailing list