guile-devel
[Top][All Lists]
Advanced

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

Re: bug in throw.c


From: Marius Vollmer
Subject: Re: bug in throw.c
Date: 03 May 2003 23:47:23 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Rob Browning <address@hidden> writes:

> 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)?

(I did the original fix, not Dirk, so I'm to blame here.)

The original fix is only needed for GCC 2.95.2 and there only for
i386, probably.

I would say it is safe now to just remove the asm bogosity, as has
already been done in the 1.6 branch.

I will port he 1.6 changes to the 1.7 series.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405




reply via email to

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