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: Nick Roberts
Subject: Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1
Date: Wed, 26 Jul 2006 00:15:41 +1200

 > 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>

That's odd because your previous post said you got 527076.

 > > 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):
 > 

No.  What value does the GDB command `finish' print if starting from
extract_float, or equivalently, what do you get if you type `print d'
after

   556    double d = extract_float (arg);

i.e at

   561    IN_FLOAT (d = sqrt (d), "sqrt", arg);


 >...
 >      (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:

Actually Emacs is computing sqrt (527076) at this point (it's to do with the
way Lisp Objects store numbers).

sqrt (527076) = 726

I think in your case sqrt gets called by tty-color-off-gray-diag in
tty-colors.el but it would be best to find out what goes wrong in Fsqrt.

What happens if you start Emacs as a graphical application and evaluate
(sqrt 527076) in the scratch buffer?

-- 
Nick                                           http://www.inet.net.nz/~nickrob




reply via email to

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