guile-devel
[Top][All Lists]
Advanced

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

Re: Illegal instruction in test-unwind on ia64.


From: Richard Harke
Subject: Re: Illegal instruction in test-unwind on ia64.
Date: Tue, 12 Dec 2006 21:08:54 -0800
User-agent: KMail/1.7.2

On Sun December 3 2006 21:31, Rob Browning wrote:
> Richard Harke <address@hidden> writes:
> > I thought this might be interesting to look at so I got the sources
> > out of unstable. But when I tried to build it, I got a different
> > error. Actually a warning treated as error 'returns twice' attribute
> > directive ignored This was on line 108 of continuations.c Could this
> > be the compiler version? If so, what version to use?
>
> I'm building in an unstable chroot on an ia64 machine, and there the
> compiler is gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-20).
>
> Thanks
I upgraded gcc which required upgrading the kernel, libc and a
bunch of stuff and now I can reproduce this problem.
Indeed it is in scm_call_1.  This essentially calls apply with
the continuation created in check_cont_body. the continuation
is rejected as illegal and scm_ithrow is called to find a
catch to throw to. But the throw is accomplished by calling
longjmp on the jmp_buf initialized by the call to setjmp
in scm_c_catch. Since scm_c_catch has already exitted,
this is not a valid thing to do. Apparently, for most arch's
the chances of using srewed up data is small and this
usually works. The ia64 has an internal frame value (ar.pfs)
which needs to be saved from proc entry to exit. The compiler usually
puts the value in one of the local registers in the rotating
register set. But these have changed and the value that would be
restored to ar.pfs is not valid causing the illegal inst.

But the key here is that using the jmp_bug after exiting the routine
the called jsetjmp is not proper in any case.

Richard Harke




reply via email to

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