#1813: t/op/infnan.t: failures on Darwin/PPC
---------------------+------------------------------------------------------
Reporter: jkeenan | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: core | Version: 2.8.0
Severity: medium | Keywords:
Lang: | Patch:
Platform: darwin |
---------------------+------------------------------------------------------
Comment(by plobsing):
Replying to [comment:1 plobsing]:
> What I suspect is happening is that the check against infinity in
src/spf_render.c:Parrot_sprintf_format is failing, and the system sprintf
is rendering the number as 'inf'.
>
> Assuming IEEE754, pos/neg inf only have one representation each. This
would suggest some sort of failure to extend infinites for comparisons.
>
> Please test the attached patch which adds casts to the comparisons.
>
What we got from a short debug session on irc:
* the patch does not work
* PARROT_HAS_INF_NAN is defined
* i386 (working), and ppc (non-working) versions of math.h have
identical definintions of INFINITY
Avenues of attack:
* is the value contained in the HUGEFLOATVAL an infinity at the point of
comparison?
{{{
> cat test.pir
.sub 'main' :main
$N0 = 'Inf'
say $N0
.end
> gdb --args ./parrot test.pir
...
(gdb) break src/spf_render.c:833
...
Breakpoint 1 (src/spf_render.c:833) pending.
(gdb) r
...
(gdb) p thefloat
$1 = inf
}}}
* is the comparison operation being performed valid? Snip out the
relevant portion (comparisons with PARROT_FLOATVAL_INF* around
src/spf_render.c:828) out of:
{{{
> gdb blib/lib/libparrot.so
...
(gdb) disassemble/m Parrot_sprintf_format
}}}
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1813#comment:2>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets