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

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

Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1


From: Peter Dyballa
Subject: Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1
Date: Tue, 25 Jul 2006 13:13:15 +0200


Am 25.07.2006 um 05:09 schrieb Richard Stallman:


What is the value of d before line 561?  That could mean something.


I don't think that this can matter -- the error happens in this function as defined in floatfns.c:

  551   DEFUN ("sqrt", Fsqrt, Ssqrt, 1, 1, 0,
  552          doc: /* Return the square root of ARG.  */)
  553        (arg)
  554        register Lisp_Object arg;
  555   {
  556     double d = extract_float (arg);
  557   #ifdef FLOAT_CHECK_DOMAIN
  558     if (d < 0.0)
  559       domain_error ("sqrt", arg);
  560   #endif
  561     IN_FLOAT (d = sqrt (d), "sqrt", arg);
  562     return make_float (d);
  563   }

If my understanding of (old) C still stands, d is a local variable inside the function's body. At line #556 a 'print d' tells:

        $1 = {<text variable, no debug info>} 0x901aea38 <d>


What value does extract_float return?


  214   /* Extract a Lisp number as a `double', or signal an error.  */
  215   
  216   double
  217   extract_float (num)
  218        Lisp_Object num;
  219   {
  220     CHECK_NUMBER_OR_FLOAT (num);
  221   
  222     if (FLOATP (num))
  223       return XFLOAT_DATA (num);
  224     return (double) XINT (num);
  225   }

Do you mean to type x when gdb has reached line #225? I get for example (own input mostly deleted):

        Breakpoint 2, extract_float (num=5145654) at floatfns.c:220
        0x1f0ebc <extract_float+28>:      0x80010078
        resize_mini_window (w=0x15014e8, exact_p=0) at xdisp.c:8248
        
        Breakpoint 2, extract_float (num=5146190) at floatfns.c:220
        0x36f2c <resize_mini_window+656>: 0x80010050
        Fmake_hash_table (nargs=0, args=0xbfffd614) at fns.c:5270
        
        Breakpoint 2, extract_float (num=4216608) at floatfns.c:220
        (gdb) x
        0x36f2c <resize_mini_window+656>: 0x80010050
        (gdb) n
        Fsqrt (arg=4216608) at floatfns.c:561
        (gdb) n
Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/ operand.
        0x001f2828 in Fsqrt (arg=4216608) at floatfns.c:561
        Breakpoint 6 at 0x1f27e4: file floatfns.c, line 561.
        (gdb) x
        0x1f27e4 <Fsqrt+48>:      0x3c5f0020


It might be worth to find the Elisp file that uses sqrt with the argument of 4216608. *I* have no idea how to find that file ... A termscript shows this:

        Loading shell...
        done
        ansi-color...
        done
        Loading cal-move...
        done
        mule-util...done

In the last gdb session, as shown above, the last "message" was the modeline of the *scratch* buffer (I had to fake TERM for gdb to be xterm-color to make GNU Emacs launch with no window inside a gud buffer in Emacs.app, the "NeXTStep" like application).

--
Greetings

  Pete
              <\
                \__     O                       __O
                | O\   _\\/\-%                _`\<,
                '()-'-(_)--(_)               (_)/(_)







reply via email to

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