[Top][All Lists]
[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: |
Mon, 24 Jul 2006 23:31:46 +0200 |
Am 24.07.2006 um 16:42 schrieb Richard Stallman:
When launched in Terminal GNU Emacsen 22.0.50 and 23.0.0 both
crash
after some time. In gdb GNU Emacs continues until:
Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/
operand.
0x001f26d8 in Fsqrt (arg=501192) at floatfns.c:561
561 IN_FLOAT (d = sqrt (d), "sqrt", arg);
Please examine relevant variables (you can start with d)
to determine what's actually happening in the function.
After a few 'make distclean ; ./configure ... ; make' cycles it
seems
to be this gcc option that makes GNU Emacs crash when running
with no
windows: -mpowerpc-gpopt. This is again true for both GNU Emacsen
22.0.50 and 23.0.0. More optimisation like -O2 works.
This could be a GCC bug. However, the only way to track it down
is to find the place where the compiled code is wrong. To do that,
you need to debug the program in the usual way.
If you put a breakpoint at Fsqrt and step thru, what do you see?
pete 274 /\ gdb emacs
GNU gdb 6.3.50-20050815 (Apple version gdb-477) (Sun Apr 30 20:06:22
GMT 2006)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "powerpc-apple-darwin"...Reading symbols
for shared libraries ................. done
DISPLAY = :0.0
TERM = xterm-color
Breakpoint 1 at 0x1f27d4: file floatfns.c, line 556.
Breakpoint 2 at 0x151c2c: file sysdep.c, line 1393.
(gdb) run
Starting program: /Users/pete/Quellen/Emacs_CVS/emacs/src/emacs -Q -nw
Reading symbols for shared libraries ..++++++ done
No struct type named Lisp_Symbol.
(gdb) cont
Continuing.
Breakpoint 1, Fsqrt (arg=4216608) at floatfns.c:556
556 double d = extract_float (arg);
(gdb) step
extract_float (num=2) at floatfns.c:219
219 {
(gdb) step
220 CHECK_NUMBER_OR_FLOAT (num);
(gdb) step
222 if (FLOATP (num))
(gdb) step
224 return (double) XINT (num);
(gdb) step
225 }
(gdb) step
Fsqrt (arg=4216608) at floatfns.c:561
561 IN_FLOAT (d = sqrt (d), "sqrt", arg);
(gdb) step
Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/
operand.
0x001f2828 in Fsqrt (arg=4216608) at floatfns.c:561
561 IN_FLOAT (d = sqrt (d), "sqrt", arg);
(gdb) quit
The program is running. Exit anyway? (y or n) y
When hitting the breakpoint d is 7.1699012343114344e-308 (__DBL_MIN__
is #define's as 2.2250738585072014e-308), when I hit the bad
statement d has become 527076.
Can I do some more?
The error might come from my side! Reading once more the Apple docs
on gcc 4 it seems that my PowerPC processor, PPC 7447A, is a 64 bit
model and by using -mpowerpc I put into 32 bit mode. And this
contradicts the -mcpu=7450 setting (7450 is the correct cpu model for
the 7447A). I made again distclean and re-configured again -- and
again the same error:
Breakpoint 1, Fsqrt (arg=4216608) at floatfns.c:556
556 double d = extract_float (arg);
(gdb) step
extract_float (num=2) at floatfns.c:219
219 {
(gdb) step
220 CHECK_NUMBER_OR_FLOAT (num);
(gdb) step
222 if (FLOATP (num))
(gdb) step
224 return (double) XINT (num);
(gdb) step
225 }
(gdb) step
Fsqrt (arg=4216608) at floatfns.c:561
561 IN_FLOAT (d = sqrt (d), "sqrt", arg);
(gdb) step
Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/
operand.
0x001f2828 in Fsqrt (arg=4216608) at floatfns.c:561
561 IN_FLOAT (d = sqrt (d), "sqrt", arg);
d is the same as above when reaching the breakpoint and when the bad
instruction strikes.
--
Greetings
Pete
The future will be much better tomorrow.
-- George W. Bush
- Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Peter Dyballa, 2006/07/23
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Richard Stallman, 2006/07/24
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1,
Peter Dyballa <=
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Richard Stallman, 2006/07/24
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Peter Dyballa, 2006/07/25
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Nick Roberts, 2006/07/25
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Peter Dyballa, 2006/07/25
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Nick Roberts, 2006/07/25
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, YAMAMOTO Mitsuharu, 2006/07/25
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Richard Stallman, 2006/07/26
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Peter Dyballa, 2006/07/26
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Richard Stallman, 2006/07/27
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Peter Dyballa, 2006/07/27