[Pkg-octave-devel] Bug#532656: octave3.2_3.2.0-1(mips/unstable): FTBFS on mips. Segfault in regression test.
rafael at debian.org
Mon Jun 15 10:54:32 UTC 2009
* Rafael Laboissiere <rafael at debian.org> [2009-06-14 22:45]:
> Now, I am wondering whether the code in set_format() makes sense. The
> function reads:
> static void
> set_format (const Complex& c, int& r_fw, int& i_fw)
> // [snip]
> double rp = c.real ();
> double ip = c.imag ();
> bool inf_or_nan = (xisinf (c) || xisnan (c));
> bool int_only = (D_NINT (rp) == rp && D_NINT (ip) == ip);
> double r_abs = rp < 0.0 ? -rp : rp;
> double i_abs = ip < 0.0 ? -ip : ip;
> int r_x = r_abs == 0.0
> ? 0 : static_cast<int> (floor (log10 (r_abs) + 1.0));
> // [snip]
> When r_abs is NaN (as in the bug-triggering case) what is the sense of
> computing log10 (r_abs) and propagating the result? I am probably
> missing something but it seems just pure chance that r_x ends up being
> negative on amd64 and i386, what does not trigger the bug.
Attached below is a patch for pr-output.cc that makes Octave work as
expected for 'complex(NaN,0)' on mips (and amd64 as well, FWIW). The
package is being built right now on mips and on amd64 and, if everything
goes well on both arches, I will upload to unstable a new version of the
package, octave3.2_3.2.0-2, containing the patch.
I am rushing with this because everything else is being held by this bug,
like the upload of the new octave-forge packages.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 584 bytes
Desc: not available
More information about the Pkg-octave-devel