emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: SIGSEGV in X export display.


From: Michaël Cadilhac
Subject: Re: SIGSEGV in X export display.
Date: Mon, 23 Oct 2006 15:00:31 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     Program received signal SIGSEGV, Segmentation fault.
>     [Switching to Thread 16384 (LWP 19690)]
>     0x0817ef1d in mark_object (arg=3D135891787) at alloc.c:5509
>     5509            MARK_INTERVAL_TREE (ptr->intervals);
>
> I did not realize that there was a SEGV inside mark_object.  That is
> very important.  It probably means that something created invalid a
> Lisp object, and later GC stumbled across it.

Seems like a corrupted stack, in fact.

>
>     #0  0x0817ef1d in mark_object (arg=3D135891787) at alloc.c:5509
>           ptr =3D (struct Lisp_String *) 0x8198b48
>           obj =3D 135891787
>           cdr_count =3D 0
>     #1  0x081cd803 in mark_byte_stack () at bytecode.c:294
>           stack =3D (struct byte_stack *) 0xbf81c210
>           obj =3D (Lisp_Object *) 0xbf81c288
>
> The next step is to find out which stack slot is being marked,
> and then find out what that stack slot really is.
> Which stack frame is it in; what variable is it?

Okey,  fair enough.  The  problem  is that  the  whole thing  isn't...
deterministic. Sometimes  the bug occurs  at line 292,  sometimes line
295, an so on.

For example, here, stack->constants seems wrong.

   x274     void
   x275     mark_byte_stack ()
   x276     {
   x277       struct byte_stack *stack;
   x278       Lisp_Object *obj;
   x279
   x280       for (stack = byte_stack_list; stack; stack = stack->next)
   x281         {
   x282           /* If STACK->top is null here, this means there's an opcode in
   x283              Fbyte_code that wasn't expected to GC, but did.  To find 
out
   x284              which opcode this is, record the value of `stack', and walk
   x285              up the stack in a debugger, stopping in frames of 
Fbyte_code.
   x286              The culprit is found in the frame of Fbyte_code where the
   x287              address of its local variable `stack' is equal to the
   x288              recorded value of `stack' here.  */
   x289           eassert (stack->top);
   x290
   x291           for (obj = stack->bottom; obj <= stack->top; ++obj)
   x292             mark_object (*obj);
   x293
   x294           mark_object (stack->byte_string);
  >x295           mark_object (stack->constants);
   x296         }
   x297     }

(gdb) p *stack
$6 = {pc = 0x8375629 "", top = 0x6610, bottom = 0xbff3c988,
  byte_string = 135894490, byte_string_start = 0x8db940c "@\223 \b \b
  \210 \bD\223 \b8", constants = 1, next = 0xbff3c9a4}

What can I do to help ?

-- 
/!\ My mail address changed, please update your files accordingly.
 |      Michaël `Micha' Cadilhac   |  I cannot reproduce this bug,          |
 |         Epita/LRDE Promo 2007   |    but I have installed a change       |
 |  http://michael.cadilhac.name   |      which I think will fix it.        |
 `--  -   JID: address@hidden --'          -- Kim F. Storm          -  --'

Attachment: pgpMuCBXZh4ih.pgp
Description: PGP signature


reply via email to

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