One test in data.cc crashes Octave 3.1.51
Jaroslav Hajek
highegg at gmail.com
Tue Aug 12 01:25:48 CDT 2008
On Mon, Aug 11, 2008 at 10:54 PM, Thomas Treichl <Thomas.Treichl at gmx.net> wrote:
> Hi,
>
> I have still some more problems after compiling 3.1.51 for PPC (but overall just
> 7 test failures). One special test in data.cc crashes Octave, I have found out
> the source where it appears (data.cc, line 1064):
>
> %!assert(log2(complex(0,Inf)), Inf + log2(i));
>
> I split the commands and found out more:
>
> octave:1> A = Inf
> A = Inf
> octave:2> B = log2(i)
> B = 0.00000 + 2.26618i
> octave:3> A+B
> panic: Segmentation fault -- stopping myself...
> ans = Inf + attempting to save variables to `octave-core'...
> save to `octave-core' complete
> Segmentation fault
>
I can't reproduce this crash. Can you share your config.log, or just
tell me whether you have log2 in libm?
> And I don't have any idea where to go from here looking for this bug. My second
> test was:
>
> octave:1> complex(0,Inf)
> ans = 0 + Infi
> octave:2> log2(complex(0,Inf))
again, works fine here: Inf + 2.266i. It almost looks as if you have
still the old log2 around!
What does "which log2" say?
> ans = NaN - NaNi
Octave can use -NaN instead of NaN. I sent a simple fix some time ago,
but apparently it was never applied, even though John stamped it "a
reasonable thing to do" later in the same thread.
See <http://www.nabble.com/Re%3A-automatic-Inf%2BNaN*i-conversion-p16895792.html>
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
More information about the Bug-octave
mailing list