unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* emacs segfault on bootstrap
@ 2006-01-26 13:10 Clemens Schueller
  2006-01-29  5:31 ` cyd
  0 siblings, 1 reply; 11+ messages in thread
From: Clemens Schueller @ 2006-01-26 13:10 UTC (permalink / raw)


Hey Folks!


I'm trying to compile the emacs from cvs:


A "./configure --prefix=/opt/emacs22 --disable-largefile" runs without
problems.

But when I type "make bootstrap", I become the following errormessage:


+----
| gcc -c -D_BSD_SOURCE   -Demacs -DHAVE_CONFIG_H   -I. -I/misc/cvs/emacs/src -D_BSD_SOURCE -O9 -funroll-loops -ffast-math -malign-double -march=athlon-xp -fomit-frame-pointer -fno-exceptions vm-limit.c
| gcc -Demacs -DHAVE_CONFIG_H   -I. -I/misc/cvs/emacs/src -D_BSD_SOURCE -O9 -funroll-loops -ffast-math -malign-double -march=athlon-xp -fomit-frame-pointer -fno-exceptions -Wl,-znocombreloc /misc/cvs/emacs/src/prefix-args.c -o prefix-args
| echo "dispnew.o frame.o scroll.o xdisp.o xmenu.o window.o charset.o coding.o category.o ccl.o cm.o term.o xfaces.o   emacs.o keyboard.o macros.o keymap.o sysdep.o buffer.o filelock.o insdel.o marker.o minibuf.o fileio.o dired.o filemode.o cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o alloc.o data.o doc.o editfns.o callint.o eval.o floatfns.o fns.o print.o lread.o abbrev.o syntax.o unexelf.o bytecode.o process.o callproc.o region-cache.o sound.o atimer.o doprnt.o strftime.o intervals.o textprop.o composite.o md5.o    terminfo.o lastfile.o   vm-limit.o    " > buildobj.lst
| gcc -nostdlib `./prefix-args -Xlinker  -z nocombreloc` -Wl,-znocombreloc -o temacs pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o dispnew.o frame.o scroll.o xdisp.o xmenu.o window.o charset.o coding.o category.o ccl.o cm.o term.o xfaces.o   emacs.o keyboard.o macros.o keymap.o sysdep.o buffer.o filelock.o insdel.o marker.o minibuf.o fileio.o dired.o filemode.o cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o alloc.o data.o doc.o editfns.o callint.o eval.o floatfns.o fns.o print.o lread.o abbrev.o syntax.o unexelf.o bytecode.o process.o callproc.o region-cache.o sound.o atimer.o doprnt.o strftime.o intervals.o textprop.o composite.o md5.o    terminfo.o lastfile.o   vm-limit.o        -lncurses   -lm -lgcc -lc -lgcc /usr/lib/crtn.o 
| ./temacs --batch --load loadup bootstrap
| Loading loadup.el (source)...
| Using load-path (/misc/cvs/emacs/lisp /misc/cvs/emacs/lisp/emacs-lisp /misc/cvs/emacs/lisp/language /misc/cvs/emacs/lisp/international /misc/cvs/emacs/lisp/textmodes)
| Loading emacs-lisp/byte-run (source)...
| Loading emacs-lisp/backquote (source)...
| Loading subr (source)...
| Wrong type argument: listp, [-134382880 [17224787 #0 make[2]: *** [bootstrap-emacs] Speicherzugriffsfehler
| make[2]: Verlasse Verzeichnis »/misc/cvs/emacs/src«
| make[1]: *** [bootstrap-build] Fehler 2
| make[1]: Verlasse Verzeichnis »/misc/cvs/emacs«
| make: *** [bootstrap] Fehler 2
+----

My locale is set to german: Speicherzugriffsfehler --> segfault
                            Fehler --> error


What goes wrong here - anybody an idea?


TIA


Clemens Schueller
-- 
np: Yves Deruyter - Calling Earth

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs segfault on bootstrap
  2006-01-26 13:10 emacs segfault on bootstrap Clemens Schueller
@ 2006-01-29  5:31 ` cyd
  2006-01-29 18:24   ` David Koppelman
  0 siblings, 1 reply; 11+ messages in thread
From: cyd @ 2006-01-29  5:31 UTC (permalink / raw)
  Cc: emacs-devel

> A "./configure --prefix=/opt/emacs22 --disable-largefile" runs without
> problems.
>
> But when I type "make bootstrap", I become the following errormessage:
>
> [bootstrap-emacs] Speicherzugriffsfehler
> | make[2]: Verlasse Verzeichnis »/misc/cvs/emacs/src«
> | make[1]: *** [bootstrap-build] Fehler 2
> | make[1]: Verlasse Verzeichnis »/misc/cvs/emacs«
> | make: *** [bootstrap] Fehler 2
> +----
>
> What goes wrong here - anybody an idea?

I can't reproduce this.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs segfault on bootstrap
  2006-01-29  5:31 ` cyd
@ 2006-01-29 18:24   ` David Koppelman
  2006-01-29 19:09     ` Chong Yidong
  2006-02-01 18:40     ` Clemens Schueller
  0 siblings, 2 replies; 11+ messages in thread
From: David Koppelman @ 2006-01-29 18:24 UTC (permalink / raw)
  Cc: emacs-devel

I have encountered a similar problem. Could you try putting

CFLAGS="-g -O2"

near the top of "configure", perhaps just above
the line:
  # Be Bourne compatible

Then re-run configure, do a "make clean" and then a "make bootstrap".

cyd@stupidchicken.com writes:

>> A "./configure --prefix=/opt/emacs22 --disable-largefile" runs without
>> problems.
>>
>> But when I type "make bootstrap", I become the following errormessage:
>>
>> [bootstrap-emacs] Speicherzugriffsfehler
>> | make[2]: Verlasse Verzeichnis Â»/misc/cvs/emacs/srcÂ«
>> | make[1]: *** [bootstrap-build] Fehler 2
>> | make[1]: Verlasse Verzeichnis Â»/misc/cvs/emacsÂ«
>> | make: *** [bootstrap] Fehler 2
>> +----
>>
>> What goes wrong here - anybody an idea?
>
> I can't reproduce this.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs segfault on bootstrap
  2006-01-29 18:24   ` David Koppelman
@ 2006-01-29 19:09     ` Chong Yidong
  2006-01-29 19:22       ` David Koppelman
                         ` (2 more replies)
  2006-02-01 18:40     ` Clemens Schueller
  1 sibling, 3 replies; 11+ messages in thread
From: Chong Yidong @ 2006-01-29 19:09 UTC (permalink / raw)
  Cc: emacs-devel, Clemens Schueller

OK, now I can reproduce this (I had to reinstall gcc-3.4 -- the bug
doesn't show up for gcc4, or for -O2 and below).

I managed to get a backtrace.  A Lisp_Int was passed to print_object,
but, for some reason, print_object is in the Lisp_Vectorlike case
statement instead.

A cursory inspection did not reveal any bugs in print_object.  Smells
like a compiler bug.

Program received signal SIGSEGV, Segmentation fault.
0x0819c3be in print_object (obj=58, printcharfun=137788457, escapeflag=1)
    at print.c:2009
2009          switch (XMISCTYPE (obj))
(gdb) bt
#0  0x0819c3be in print_object (obj=58, printcharfun=137788457, escapeflag=1)
    at print.c:2009
#1  0x0819c4c5 in print_object (obj=137726760, printcharfun=137788457, 
    escapeflag=1) at print.c:1999
#2  0x0819e989 in Fprin1 (object=137726764, printcharfun=137788457)
    at print.c:1295
#3  0x0819eedd in print_error_message (data=142518805, stream=137788457, 
    context=0x2 <Address 0x2 out of bounds>, caller=142518437) at print.c:1097
#4  0x08112a1a in cmd_error_internal (data=142518805, context=0xbfcfffb0 "")
    at keyboard.c:1263
#5  0x08112bae in cmd_error (data=142518805) at keyboard.c:1200
#6  0x081856fc in internal_condition_case (bfun=0x811c420 <command_loop_1>, 
    handlers=137832193, hfun=0x8112ad0 <cmd_error>) at eval.c:1455
#7  0x0810cda6 in command_loop_2 () at keyboard.c:1323
#8  0x0818564a in internal_catch (tag=2, func=0x810cd80 <command_loop_2>, 
    arg=137788409) at eval.c:1211
#9  0x0810cc3d in recursive_edit_1 () at keyboard.c:1302
#10 0x0810cd3c in Frecursive_edit () at keyboard.c:1056
#11 0x0810bff3 in main (argc=3, argv=0xbfd00574) at emacs.c:1789
(gdb) f 1
#1  0x0819c4c5 in print_object (obj=137726760, printcharfun=137788457, 
    escapeflag=1) at print.c:1999
1999                    print_object (tem, printcharfun, escapeflag);
(gdb) p tem
$3 = 2
(gdb) p size
$4 = 10
(gdb) p obj
$5 = 137726760
(gdb) xtype
Lisp_Int
(gdb) xvector
$6 = (struct Lisp_Vector *) 0x8358b28
0
(gdb) p $6->contents[0]
$11 = 58

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs segfault on bootstrap
  2006-01-29 19:09     ` Chong Yidong
@ 2006-01-29 19:22       ` David Koppelman
  2006-01-29 19:39       ` Eli Zaretskii
  2006-01-30 18:46       ` Richard M. Stallman
  2 siblings, 0 replies; 11+ messages in thread
From: David Koppelman @ 2006-01-29 19:22 UTC (permalink / raw)
  Cc: Clemens Schueller, emacs-devel

FWIW, I get a "Wrong type argument: listp" under many compile
variations, but only a few are followed by seg faults. (See messages
with the subject "Error with -O3 but not -O2: "Wrong type argument:
listp".)

Chong Yidong <cyd@stupidchicken.com> writes:

> OK, now I can reproduce this (I had to reinstall gcc-3.4 -- the bug
> doesn't show up for gcc4, or for -O2 and below).
>
> I managed to get a backtrace.  A Lisp_Int was passed to print_object,
> but, for some reason, print_object is in the Lisp_Vectorlike case
> statement instead.
>
> A cursory inspection did not reveal any bugs in print_object.  Smells
> like a compiler bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs segfault on bootstrap
  2006-01-29 19:09     ` Chong Yidong
  2006-01-29 19:22       ` David Koppelman
@ 2006-01-29 19:39       ` Eli Zaretskii
  2006-01-29 19:50         ` David Koppelman
  2006-01-30 18:46       ` Richard M. Stallman
  2 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2006-01-29 19:39 UTC (permalink / raw)
  Cc: koppel, c.schueller, emacs-devel

> From: Chong Yidong <cyd@stupidchicken.com>
> Date: Sun, 29 Jan 2006 14:09:03 -0500
> Cc: emacs-devel@gnu.org, Clemens Schueller <c.schueller@gmx.at>
> 
> OK, now I can reproduce this (I had to reinstall gcc-3.4 -- the bug
> doesn't show up for gcc4, or for -O2 and below).
> 
> I managed to get a backtrace.  A Lisp_Int was passed to print_object,
> but, for some reason, print_object is in the Lisp_Vectorlike case
> statement instead.
> 
> A cursory inspection did not reveal any bugs in print_object.  Smells
> like a compiler bug.

Thanks.  I'd suggest to look at the machine code in that function and
see if you can spot any compiler bugs.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs segfault on bootstrap
  2006-01-29 19:39       ` Eli Zaretskii
@ 2006-01-29 19:50         ` David Koppelman
  2006-01-30  4:19           ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: David Koppelman @ 2006-01-29 19:50 UTC (permalink / raw)
  Cc: Chong Yidong, emacs-devel, c.schueller

Eli Zaretskii <eliz@gnu.org> writes:

> Thanks.  I'd suggest to look at the machine code in that function and
> see if you can spot any compiler bugs.

Is there a way to get a lisp backtrace in temacs?  It seems like the
problem starts before print_object is called.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs segfault on bootstrap
  2006-01-29 19:50         ` David Koppelman
@ 2006-01-30  4:19           ` Eli Zaretskii
  0 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2006-01-30  4:19 UTC (permalink / raw)
  Cc: cyd, emacs-devel, c.schueller

> Cc: Chong Yidong <cyd@stupidchicken.com>, c.schueller@gmx.at,
>    emacs-devel@gnu.org
> From: David Koppelman <koppel@ece.lsu.edu>
> Date: Sun, 29 Jan 2006 13:50:12 -0600
> 
> Is there a way to get a lisp backtrace in temacs?

Sure: start GDB from the src directory, and then you will have the
"xbacktrace" command in GDB to do this.  Is that what you want?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs segfault on bootstrap
  2006-01-29 19:09     ` Chong Yidong
  2006-01-29 19:22       ` David Koppelman
  2006-01-29 19:39       ` Eli Zaretskii
@ 2006-01-30 18:46       ` Richard M. Stallman
  2 siblings, 0 replies; 11+ messages in thread
From: Richard M. Stallman @ 2006-01-30 18:46 UTC (permalink / raw)
  Cc: koppel, c.schueller, emacs-devel

    A cursory inspection did not reveal any bugs in print_object.  Smells
    like a compiler bug.

    Program received signal SIGSEGV, Segmentation fault.
    0x0819c3be in print_object (obj=58, printcharfun=137788457, escapeflag=1)
	at print.c:2009
    2009          switch (XMISCTYPE (obj))
    (gdb) bt
    #0  0x0819c3be in print_object (obj=58, printcharfun=137788457, escapeflag=1)
	at print.c:2009

    (gdb) p obj
    $5 = 137726760
    (gdb) xtype
    Lisp_Int

Do you think that frame 1 mistakenly treated an int
as a vector?

If so, could you look around some more and try to prove it
conclusively?  Try to determine which line did something wrong.
Perhaps you could then easily step through and prove that the
incorrect computation occurs in a certain line or range of lines.

That's all the info needed to make a useful GCC bug report
so that this will get fixed.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs segfault on bootstrap
  2006-01-29 18:24   ` David Koppelman
  2006-01-29 19:09     ` Chong Yidong
@ 2006-02-01 18:40     ` Clemens Schueller
  2006-02-03  5:03       ` Richard M. Stallman
  1 sibling, 1 reply; 11+ messages in thread
From: Clemens Schueller @ 2006-02-01 18:40 UTC (permalink / raw)


Hello!

* On 29.01.2006, David Koppelman wrote:

> I have encountered a similar problem. Could you try putting
>
> CFLAGS="-g -O2"
>
> near the top of "configure", perhaps just above
> the line:
>   # Be Bourne compatible
>
> Then re-run configure, do a "make clean" and then a "make bootstrap".

Thanks for the hint. This was the correct solution:

My CFLAGS Environment contained a "-O9".



Greetinx and thanks a lot 

Clemens Schueller
-- 
np: Jeanette - Hold the Line

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs segfault on bootstrap
  2006-02-01 18:40     ` Clemens Schueller
@ 2006-02-03  5:03       ` Richard M. Stallman
  0 siblings, 0 replies; 11+ messages in thread
From: Richard M. Stallman @ 2006-02-03  5:03 UTC (permalink / raw)
  Cc: emacs-devel

    My CFLAGS Environment contained a "-O9".

I think that means you have encountered a GCC bug.
We should not just ignore it--GCC needs to be fixed, too.

Is it the same one that we have just been investigating,
or a different one?

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-02-03  5:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-26 13:10 emacs segfault on bootstrap Clemens Schueller
2006-01-29  5:31 ` cyd
2006-01-29 18:24   ` David Koppelman
2006-01-29 19:09     ` Chong Yidong
2006-01-29 19:22       ` David Koppelman
2006-01-29 19:39       ` Eli Zaretskii
2006-01-29 19:50         ` David Koppelman
2006-01-30  4:19           ` Eli Zaretskii
2006-01-30 18:46       ` Richard M. Stallman
2006-02-01 18:40     ` Clemens Schueller
2006-02-03  5:03       ` Richard M. Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).