From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.bugs Subject: bug#15842: Integer overflow on Mac OS X 64-bit Date: Thu, 14 Nov 2013 19:25:25 -0500 Message-ID: <877gcaa4ui.fsf@netris.org> References: <20974648.zh0m7Q2JlI@legolas.kobaltwit.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1384475233 4381 80.91.229.3 (15 Nov 2013 00:27:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Nov 2013 00:27:13 +0000 (UTC) Cc: 15842-done@debbugs.gnu.org To: Geert Janssens Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Fri Nov 15 01:27:18 2013 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vh7Fm-0001Yq-Ek for guile-bugs@m.gmane.org; Fri, 15 Nov 2013 01:27:18 +0100 Original-Received: from localhost ([::1]:57881 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vh7Fl-00033R-Fv for guile-bugs@m.gmane.org; Thu, 14 Nov 2013 19:27:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35485) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vh7Fe-00032M-9N for bug-guile@gnu.org; Thu, 14 Nov 2013 19:27:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vh7FX-0001ps-Es for bug-guile@gnu.org; Thu, 14 Nov 2013 19:27:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38814) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vh7FX-0001po-CE for bug-guile@gnu.org; Thu, 14 Nov 2013 19:27:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Vh7FW-0002oV-PO for bug-guile@gnu.org; Thu, 14 Nov 2013 19:27:02 -0500 Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-To: bug-guile@gnu.org Resent-Date: Fri, 15 Nov 2013 00:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 15842 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Mail-Followup-To: 15842@debbugs.gnu.org, mhw@netris.org, geert@kobaltwit.be Original-Received: via spool by 15842-done@debbugs.gnu.org id=D15842.138447517510755 (code D ref 15842); Fri, 15 Nov 2013 00:27:01 +0000 Original-Received: (at 15842-done) by debbugs.gnu.org; 15 Nov 2013 00:26:15 +0000 Original-Received: from localhost ([127.0.0.1]:52831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vh7Ek-0002nN-Kj for submit@debbugs.gnu.org; Thu, 14 Nov 2013 19:26:15 -0500 Original-Received: from world.peace.net ([96.39.62.75]:44463 ident=hope0) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vh7Eh-0002nE-Rz for 15842-done@debbugs.gnu.org; Thu, 14 Nov 2013 19:26:12 -0500 Original-Received: from turntable.mit.edu ([18.160.0.29] helo=yeeloong) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Vh7EY-0003MC-Vc; Thu, 14 Nov 2013 19:26:03 -0500 In-Reply-To: <20974648.zh0m7Q2JlI@legolas.kobaltwit.lan> (Geert Janssens's message of "Sat, 09 Nov 2013 17:39:10 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7339 Archived-At: Geert Janssens 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