From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vasiliy Newsgroups: gmane.lisp.guile.bugs Subject: bug#14789: BUG: Modules compile as ELF's on PE/PE+ architecture Date: Sat, 6 Jul 2013 22:11:42 +0200 Message-ID: References: <87wqp5asca.fsf@tines.lan> <877gh3a4ji.fsf@tines.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1373141534 26346 80.91.229.3 (6 Jul 2013 20:12:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Jul 2013 20:12:14 +0000 (UTC) Cc: 14789@debbugs.gnu.org To: Mark H Weaver Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sat Jul 06 22:12:15 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 1UvYq6-0005Ez-4o for guile-bugs@m.gmane.org; Sat, 06 Jul 2013 22:12:14 +0200 Original-Received: from localhost ([::1]:49672 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvYq5-0005KK-K4 for guile-bugs@m.gmane.org; Sat, 06 Jul 2013 16:12:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvYpy-0005Jz-Qk for bug-guile@gnu.org; Sat, 06 Jul 2013 16:12:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UvYpu-0001FE-Kw for bug-guile@gnu.org; Sat, 06 Jul 2013 16:12:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvYpu-0001F6-H5 for bug-guile@gnu.org; Sat, 06 Jul 2013 16:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UvYpt-0004HN-Ub for bug-guile@gnu.org; Sat, 06 Jul 2013 16:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vasiliy Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 06 Jul 2013 20:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14789 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 14789-submit@debbugs.gnu.org id=B14789.137314151216424 (code B ref 14789); Sat, 06 Jul 2013 20:12:01 +0000 Original-Received: (at 14789) by debbugs.gnu.org; 6 Jul 2013 20:11:52 +0000 Original-Received: from localhost ([127.0.0.1]:35399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UvYpj-0004Go-7a for submit@debbugs.gnu.org; Sat, 06 Jul 2013 16:11:52 -0400 Original-Received: from mail-ie0-f177.google.com ([209.85.223.177]:39409) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UvYpg-0004GX-4a for 14789@debbugs.gnu.org; Sat, 06 Jul 2013 16:11:49 -0400 Original-Received: by mail-ie0-f177.google.com with SMTP id aq17so7465532iec.36 for <14789@debbugs.gnu.org>; Sat, 06 Jul 2013 13:11:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=2GoegoY/JdnXXYxK0WKw4G4TfzFcVhTuZ0bhsWeMEw0=; b=KwB7VBsZwMJJXQlmtvxYxs4afS035ndKOafKfNwqJ3KSahk7CEzp5SSifdftffqMYC MPCX1om5+nSfKIGV44Jw/cBq4nHUbQHB4fLohuqFTwM39FL5d3Pt9lWYhe3byF42VIZM C7c2N1sKl3jN357MHtrydH8TF+lpzEegftEPaLR4xct/I3GiiWdSxz8dEIG3oOEqBf3M dMKZPG8zyOE0mDFNa1Ewixi+pvawl+4wjGGjzRjQFzfmUYYmoQnVAtJAbyjh6f6K0kT7 5J/EZA+W9mm6SlyD54CJknisYXkUE6bQdPPvAmtrrhexsKk7ENaTjtYXtqTYBgKZ56tf JZnA== X-Received: by 10.50.171.163 with SMTP id av3mr6038370igc.33.1373141502282; Sat, 06 Jul 2013 13:11:42 -0700 (PDT) Original-Received: by 10.42.136.71 with HTTP; Sat, 6 Jul 2013 13:11:42 -0700 (PDT) In-Reply-To: <877gh3a4ji.fsf@tines.lan> X-Google-Sender-Auth: Y3IUtR54fPLrsxbtoL-OrGjll1o 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:7201 Archived-At: Hi, Mark, Sorry for my previous double-posting to the guile-devel maillist; just at that time I didn't have a reply from guile-bugs'. I've run ./check-guile numbers.test, yes, it hasn't been invoked my "make check" from the top-level build directory. For the latest Guile compiled with CFLAGS=3D"-mtune=3Dnative -march=3Dnative -O2" I've got the following: $ ./check-guile numbers.test Testing /usr/src/64bit/release/guile/guile-2.1.0-57/build/meta/guile ... numbers.test with GUILE_LOAD_PATH=3D/usr/src/64bit/release/guile/guile-2.1.0-57/src/guil= e-2.1.0/test-suite Running numbers.test FAIL: numbers.test: inexact->exact: smallest inexact: pos - arguments: (expected-value 1/2024022533073106183524953467189173070495566497641421183569013580274303395= 679953468919603837014371244951870778643168119113898087373857934768670133999= 407385099215174242765663613644669077420932163412397676784727450685620074834= 246926986181033556491595563408100565123587695523334146152305025321863275086= 46006263307707741093494784 actual-value 0) FAIL: numbers.test: inexact->exact: smallest inexact: neg - arguments: (expected-value -1/202402253307310618352495346718917307049556649764142118356901358027430339= 567995346891960383701437124495187077864316811911389808737385793476867013399= 940738509921517424276566361364466907742093216341239767678472745068562007483= 424692698618103355649159556340810056512358769552333414615230502532186327508= 646006263307707741093494784 actual-value 0) FAIL: numbers.test: inexact->exact: smallest inexact * 2: pos - arguments: (expected-value 1/1012011266536553091762476733594586535247783248820710591784506790137151697= 839976734459801918507185622475935389321584059556949043686928967384335066999= 703692549607587121382831806822334538710466081706198838392363725342810037417= 123463493090516778245797781704050282561793847761667073076152512660931637543= 23003131653853870546747392 actual-value 0) FAIL: numbers.test: inexact->exact: smallest inexact * 2: neg - arguments: (expected-value -1/101201126653655309176247673359458653524778324882071059178450679013715169= 783997673445980191850718562247593538932158405955694904368692896738433506699= 970369254960758712138283180682233453871046608170619883839236372534281003741= 712346349309051677824579778170405028256179384776166707307615251266093163754= 323003131653853870546747392 actual-value 0) FAIL: numbers.test: inexact->exact: smallest inexact * 3: pos - arguments: (expected-value 3/2024022533073106183524953467189173070495566497641421183569013580274303395= 679953468919603837014371244951870778643168119113898087373857934768670133999= 407385099215174242765663613644669077420932163412397676784727450685620074834= 246926986181033556491595563408100565123587695523334146152305025321863275086= 46006263307707741093494784 actual-value 0) FAIL: numbers.test: inexact->exact: smallest inexact * 3: neg - arguments: (expected-value -3/202402253307310618352495346718917307049556649764142118356901358027430339= 567995346891960383701437124495187077864316811911389808737385793476867013399= 940738509921517424276566361364466907742093216341239767678472745068562007483= 424692698618103355649159556340810056512358769552333414615230502532186327508= 646006263307707741093494784 actual-value 0) Totals for this test run: passes: 28367 failures: 6 unexpected passes: 0 expected failures: 0 unresolved test cases: 0 untested test cases: 0 unsupported test cases: 0 errors: 0 Regards, Vasiliy On Sat, Jul 6, 2013 at 9:09 PM, Mark H Weaver wrote: > Vasiliy writes: > >> It's just to highlight I've got that error of: >> fail: scm_from_double (1) =3D=3D +nan.0 >> FAIL: test-conversion.exe >> >> while compiling with: >> CFLAGS=3D"-mtune=3Dnative -march=3Dnative -Ofast -fomit-frame-pointer" > > I now see the problem. -Ofast implies -ffast-math, which implies > -funsafe-math-optimizations, -ffinite-math-only, etc. Specifically, > this enabled the compiler to optimize (guile_Inf / guile_Inf) to 1.0, > which foiled Guile's attempt to create a NaN object. > > From the GCC manual (Optimize Options): > > `-Ofast' > Disregard strict standards compliance. `-Ofast' enables all `-O3' > optimizations. It also enables optimizations that are not valid > for all standard compliant programs. It turns on `-ffast-math' > and the Fortran-specific `-fno-protect-parens' and > `-fstack-arrays'. > > My recommendation would be to avoid -Ofast, not just in Guile but in > general. It is likely to create subtle problems in a lot of software. > > Things like language interpreters in particular tend to push the > boundaries of standards compliance, and are likely to be broken in > subtle ways by -Ofast. > > It's reasonable and sometimes useful to use -Ofast in isolated modules > containing hot code, but only in modules whose -Ofast safety has been > investigated by someone who understands the associated compiler > optimizations, and is familiar with the kinds of breakage that can > occur. > >> There's, however, still an error with 'test-ffi', and there's no >> automatic invocation of 'numbers.test'. > > Strange. Did you run "make check" in the top-level build directory? > > If that doesn't work, maybe try: "./check-guile numbers.test" > >> Would be there any support for -Ofast in future? > > I doubt that we would officially support it. It's possible that the > bugs introduced by -Ofast will not affect you, I don't know. At the > very least, you are likely to get incorrect answers from the numerics > library in some cases. There might be more serious problems as well. > Some of these problems might be discovered by our test suite, which you > don't seem to be running most of. Others might remain undetected. > >> Just one point more here: the latest autogen when compiled >> --with-guile=3D2.2 refers to 'scm_subr_table' not present in mainstream >> Guile. > > This indicates that you compiled against Guile 1.8's headers. You'll > need to arrange to have Guile 2.2's headers come first in the search > path. I guess the --with-libguile option to autogen's configure is what > you need. > > Regards, > Mark