unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Geert Janssens <geert@kobaltwit.be>
Cc: 15842-done@debbugs.gnu.org
Subject: bug#15842: Integer overflow on Mac OS X 64-bit
Date: Thu, 14 Nov 2013 19:25:25 -0500	[thread overview]
Message-ID: <877gcaa4ui.fsf@netris.org> (raw)
In-Reply-To: <20974648.zh0m7Q2JlI@legolas.kobaltwit.lan> (Geert Janssens's message of "Sat, 09 Nov 2013 17:39:10 +0100")

Geert Janssens <geert@kobaltwit.be> writes:
> I am experimenting with swig bindings for guile on Mac OS X. One of the 
> swig tests (the integer test) is failing. I am aware that swig is not 
> guile, but the bug seems to be reproducible in pure guile as well.
>
> When I calculate (2^64) -1 on the Mac OS X platform, it returns -1. On 
> my fedora system, the same calculation returns
> 18446744073709551615

When reporting bugs, please tell us what version of Guile you're using.

This is fixed in Guile 2.0.9.  The bug came into existence when clang
started optimizing out overflow checks, on the theory that if a signed
integer overflow occurs then the behavior is unspecified and thus the
compiler can do whatever it likes.

http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commit;h=2355f01709eadfd5350c510cdb095b4e3f71f17c
http://stackoverflow.com/questions/14495636/strange-multiplication-behavior-in-guile-scheme-interpreter

I'm closing this bug, on the assumption that you're using an old Guile
release.  Please reopen it if the problem still exists in 2.0.9.

    Thanks!
      Mark





  parent reply	other threads:[~2013-11-15  0:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-09 16:39 bug#15842: Integer overflow on Mac OS X 64-bit Geert Janssens
2013-11-14  7:22 ` William S Fulton
2013-11-15  0:25 ` Mark H Weaver [this message]
2013-11-15  8:24   ` Geert Janssens

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

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877gcaa4ui.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=15842-done@debbugs.gnu.org \
    --cc=geert@kobaltwit.be \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).