[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] Re: Can't build ACL2 using GCL under Mac OS X 3.3
From: |
Camm Maguire |
Subject: |
[Gcl-devel] Re: Can't build ACL2 using GCL under Mac OS X 3.3 |
Date: |
23 May 2004 17:56:41 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Greetings!
Aurelien Chanudet <address@hidden> writes:
> Hi Camm & all,
>
> On May 22, 2004, at 4:54, Camm Maguire wrote:
>
> > Greetings!
> >
> > I'm forwarding this to the GCL devel list and our MacOS X maintainer
> > for more detailed commentary.
>
> Thanks for that.
>
And thank you very much for your help!
...
> > John Matthews <address@hidden> writes:
> >
> However, I remember encountering this kind of SGC related issue you
> seem to be running on. In my experience, compilation occasionally
> happened to hang at this stage for me in the past because of the way
> segmentation faults are handled on OS X. First of all, the signal
> raised by segmentation faults on OS X appears to be different from the
> one raised on Linux. Second of all, si_addr does not contain the
> faulting address on OS X, which is a bug in Darwin. To workaround
> this, you have to look at the dar field of the exception state. I'm
> forwarding a copy of a mail I sent to one of Apple's development
> mailing lists in the hope that will help you understand what I'm
> alluding to here.
>
I would have thought a bad fault address would result in a crash, not
an infinite loop. It would be interesting to notice if you can
trigger the 'fault address recovery failure' message for such
situations when doing simply (si::sgc-on t) in GCL when your 'dar
exception state' workaround is disabled.
Take care,
> Could you please compile and run the following code ? Your output
> should look like : "addr = 0x00000043".
>
> #include <signal.h>
> #include <unistd.h>
> #include <stdio.h>
> #include <sys/ucontext.h>
>
> void handler (int sig, siginfo_t *info, void *scp)
> {
> ucontext_t *uc = (ucontext_t *)scp;
> fprintf(stderr, "addr = 0x%08lx\n", uc->uc_mcontext->es.dar);
> _exit(99);
> }
>
> int main(void)
> {
> struct sigaction sact;
> int ret;
>
> sigfillset(&(sact.sa_mask));
> sact.sa_flags = SA_SIGINFO;
> sact.sa_sigaction = (void (*)())handler;
> ret = sigaction (SIGBUS, &sact, 0);
> return *(int *)0x43;
> }
>
> Please, keep us posted !
>
> Aurelien
>
>
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah