[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in throw.c

From: Rob Browning
Subject: Re: bug in throw.c
Date: Thu, 10 Apr 2003 22:24:56 -0500
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

address@hidden (David Mosberger-Tang) writes:

> Today I tried to build guile-1.6.3 on ia64 linux but it failed during
> the build when trying to use guile to generate some documentation.
> Subsequently, I tried the snapshot from April 4th and it had the same
> problem.  The problem is quite obvious: in throw.c, we find:
> #if 0/*def __GNUC__*/
>   /* Dirk:FIXME:: This bugfix should be removed some time. */
>   /* GCC 2.95.2 has a bug in its optimizer that makes it generate
>      incorrect code sometimes.  This barrier stops it from being too
>      clever. */
>   asm volatile ("" : "=g" (winds));
> #endif
> This is clearly bogus: the asm statement claims that it's writing the
> "winds" variable, which isn't true.  On ia64, this has the effect that
> the "winds" gets corrupted and comes out with value "1".  Just
> disabling the workaround fixes the issue.  Perhaps the workaround is
> legitimate for some platforms, but I suspect it should always be
> disabled for gcc v3.x or newer.

Interesting.  I tracked down the same problem, but thought it was
because the optimizer was being clever with some other code that was
using macros to mess with object internals, and inadvertently hiding
the top-level object from the GC.  I fixed it by adding a

  scm_remember_upto_here_1 (winds) 

just after the abort (), but your explanation makes sense.  So if we
remove the asm, do we know if we still need a scm_remember_upto_here_1
(winds) to fix the problem Dirk was initially addressing (and would
that fix it)?

Rob Browning
rlb,, and
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4

reply via email to

[Prev in Thread] Current Thread [Next in Thread]