Subject: Re: bug#2403: 23.0.90; emacs bootstrap under AIX hangs at lisp/international/characters.el

From: Harald Maier <[email-masked]>
Date: Thu, 26 Feb 2009 19:26:00 +0100

Harald Maier <[email-masked]> writes:

> I am trying to build emacs-23.0.90 under AIX but it hangs at loading the
> characters.el file:
>
> ----------------------------------------------------------------------
> ...
> Loading /usr/maierha/build/cvs/emacs/lisp/international/mule-cmds.el (source)...
> Loading /usr/maierha/build/cvs/emacs/lisp/case-table.el (source)...
> Loading /usr/maierha/build/cvs/emacs/lisp/international/characters.el (source)...
> ----------------------------------------------------------------------
>
> This happens on AIX 5.2 and AIX 5.3 and I am using the latest CVS
> version. It looks that temacs is in an enless loop. Any idea what the
> problem might be?

I digged a little bit deeper to this problem. temacs is in a endless
loop in the following for loop in the alloca.c file:

--- alloca.c:5101 ---
#if (GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS \
     || GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS)
  mark_stack ();
#else
  {
    register struct gcpro *tail;
=>  for (tail = gcprolist; tail; tail = tail->next)
      for (i = 0; i < tail->nvars; i++)
        mark_object (tail->var[i]);
  }
#endif
---------------------
If I examine the values in gdb then I see that the second element of
gcprolist points to itself in the next element. That's why emacs loops.
---------------------
(gdb) p gcprolist
$6 = (struct gcpro *) 0x2ff20b68
(gdb) p *gcprolist
$7 = {
  next = 0x2ff20bcc, 
  var = 0x2ff20b74, 
  nvars = 3
}
(gdb) p *0x2ff20bcc 
$8 = 804391884
(gdb) p * (struct gcpro *) 0x2ff20bcc
$9 = {
  next = 0x2ff20bcc, 
  var = 0x2ff20bc8, 
  nvars = 1
}
---------------------

Any idea how to fix that? As I mentioned before on my site this happens
with AIX 5.2 and 5.3 and it doesn't matter whether it's compiled with
gcc or the IBM compiler. Emacs is configured only with X11 (no gtk an
image support).

Harald