From: "Richard W.M. Jones" <rich@annexia.org>
To: Xavier Leroy <xavier.leroy@inria.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Zarith problems on ppc64le
Date: Mon, 7 Nov 2016 16:19:43 +0000 [thread overview]
Message-ID: <20161107161943.GI27249@annexia.org> (raw)
In-Reply-To: <6a64a161-4ed0-fb07-caa1-4bf3c7f91c23@inria.fr>
On Mon, Nov 07, 2016 at 04:58:24PM +0100, Xavier Leroy wrote:
> On 07/11/2016 16:48, Richard W.M. Jones wrote:
> > On Mon, Nov 07, 2016 at 01:22:01PM +0000, Richard W.M. Jones wrote:
> >>
> >> https://bugzilla.redhat.com/show_bug.cgi?id=1392247
> >>
> >> Zarith fails tests on OCaml 4.04.0 + ppc64le with some fairly gross
> >> errors, eg:
> >>
> >> of_float -1.
> >> - = -1
> >> + = 0
> >>
> >> (It passes fine on OCaml 4.04.0 + ppc64)
> >>
> >> The implementation of Zarith is quite complex and I've so far failed
> >> to understand what's going on.
> >
> > FWIW this seems like it is invoking undefined behaviour in C. See
> > my analysis here:
> >
> > https://bugzilla.redhat.com/show_bug.cgi?id=1392247#c3
>
> Yes, something is weird here. You can try to put
>
> return Val_long((intnat) x);
>
> on line 524: it should fix the issue that you suspect.
>
> If this is the source of the problem, I'm surprised that it doesn't
> break on other platforms as well.
Yup that's exactly the fix I came up with:
https://bugzilla.redhat.com/show_bug.cgi?id=1392247#c6
There may be other places which make this assumption, but with just
that fix the tests pass successfully on ppc64le.
Thanks,
Rich.
next prev parent reply other threads:[~2016-11-07 16:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-07 13:22 Richard W.M. Jones
2016-11-07 13:31 ` Nicolas Ojeda Bar
2016-11-07 13:55 ` Francois BERENGER
2016-11-07 14:11 ` Sylvain Le Gall
2016-11-07 14:59 ` Simon Cruanes
2016-11-15 9:11 ` Bernhard Schommer
2016-11-07 15:48 ` Richard W.M. Jones
2016-11-07 15:58 ` Xavier Leroy
2016-11-07 16:19 ` Richard W.M. Jones [this message]
2016-11-08 10:00 ` Goswin von Brederlow
2016-11-08 11:10 ` Richard W.M. Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161107161943.GI27249@annexia.org \
--to=rich@annexia.org \
--cc=caml-list@inria.fr \
--cc=xavier.leroy@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox