From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Taylan Ulrich Bayirli/Kammer Newsgroups: gmane.lisp.guile.devel Subject: Re: 2.0.11 on OS X 10.9 / Xcode 5.1 Date: Thu, 24 Apr 2014 16:20:18 +0200 Message-ID: <8761lyollp.fsf@taylan.uni.cx> References: <87vbuq435v.fsf@taylan.uni.cx> <87bnwak01s.fsf@taylan.uni.cx> <87zjjsfz9x.fsf@yeeloong.lan> <87mwfdo2h2.fsf@taylan.uni.cx> <87ppk9cor5.fsf@yeeloong.lan> <87a9bcndcy.fsf@taylan.uni.cx> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1398390175 11020 80.91.229.3 (25 Apr 2014 01:42:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Apr 2014 01:42:55 +0000 (UTC) Cc: guile-devel@gnu.org To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Apr 25 03:42:49 2014 Return-path: Envelope-to: guile-devel@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 1WdVA7-0004Vh-PI for guile-devel@m.gmane.org; Fri, 25 Apr 2014 03:42:47 +0200 Original-Received: from localhost ([::1]:53215 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdVA7-0007ST-Ep for guile-devel@m.gmane.org; Thu, 24 Apr 2014 21:42:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdUjY-00079B-GK for guile-devel@gnu.org; Thu, 24 Apr 2014 21:16:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WdKVj-0002nI-KQ for guile-devel@gnu.org; Thu, 24 Apr 2014 10:20:27 -0400 Original-Received: from mail-ee0-x22c.google.com ([2a00:1450:4013:c00::22c]:57625) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdKVj-0002nA-Do for guile-devel@gnu.org; Thu, 24 Apr 2014 10:20:23 -0400 Original-Received: by mail-ee0-f44.google.com with SMTP id e49so1912776eek.31 for ; Thu, 24 Apr 2014 07:20:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=abHZO3p0J0jmhO3KSNrS1CmcDdf6SfGoXH//Le4Jo+8=; b=X4ax1q2redV7c/s5veKDqH8aMXriDxBe5hxI6KfKKZB15dK5BBP8EEiqM4uqA6KGSd qIdbxc01bQSAq/VbLoAtUgvPoi05XOCyKxIt+hKKbuucFDaFuam0zZ5KWkUNiP+6KFpZ D+dhn00hlPxF5nyNXo1Ht/b4j74Cqn+zrwtZ7sQUPAlB+dCrPRVbeg+6gHWW8uLttg9P FJYDeLoE3EyNU7bzY6sv1+XfACOlqU80s2S7QOZh2UKV7we4oSVqyrN+TGsA8zYqVp7N V6EPGNp8pzb66lAnT7z3BEkfqIua2CHsLtKq+2yO/Xdf5zM17UoRcLBU7MLdN2C/W4TJ h6Tw== X-Received: by 10.15.73.134 with SMTP id h6mr2729677eey.3.1398349222059; Thu, 24 Apr 2014 07:20:22 -0700 (PDT) Original-Received: from taylan.uni.cx (p200300514A658DB00213E8FFFEED36FB.dip0.t-ipconnect.de. [2003:51:4a65:8db0:213:e8ff:feed:36fb]) by mx.google.com with ESMTPSA id 48sm16191752eei.24.2014.04.24.07.20.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Apr 2014 07:20:21 -0700 (PDT) In-Reply-To: <87a9bcndcy.fsf@taylan.uni.cx> (Taylan Ulrich Bayirli's message of "Wed, 23 Apr 2014 19:51:25 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::22c X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17102 Archived-At: Taylan Ulrich Bayirli/Kammer writes: > The next roadblock I hit is that when I run gdb on the guile > executable, it doesn't seem to realize that the libguile dylib is > loaded, so still lacks the debug symbols from it. (When I enter "info > sharedlibrary" it says "No shared libraries loaded at this time" > although the Guile REPL and all runs, so libguile is obviously > loaded.) I'll continue tomorrow if I have time again at work. Update: I gave up on gdb on OS X and tried the native lldb, which essentially worked but failed to print relevant stack variables (maybe because of -O2). I resorted to printf debugging, but at least had immediate success! I can reproduce the problem with the following minimal program, compiled with -O1 (not necessarily -O2): /* BEGIN */ #include #include int main (int argc) { double ang = 0, s, c; /* Prevent constant-propagation. */ /* (Program must be called with no arguments.) */ if (argc == 1) ang = -0.0; s = sin (ang); c = cos (ang); /* This line is needed to reproduce. */ printf("%f\n", s); /* Prints "0.000000". */ return c /* Prevent c from being optimized out. */; } /* END */ I don't know why `c' and/or the `cos (ang)' call are needed, but I fail to reproduce the bug after only slight, seemingly irrelevant changes. With the native clang on the system, the bug can't be reproduced. Channel #gcc on Freenode suggested trying out -m32 vs. -m64, and -mfpmath=387 vs. -mfpmath=sse, but the bug persists with all combinations. I also tried out other GCC packages of MacPorts: GCC 4.3 through 4.9 all have the bug. The plain GCC 4.2 package is not supported on recent OS X versions. Apple-patched GCC 4.2 does *not* have the bug. (There are no more recent Apple-patched GCC versions.) I suppose I should move this to the GCC mailing list? Taylan