all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* unexelf.c 1.49 causes segfault
@ 2002-09-17 10:35 Bob Halley
  0 siblings, 0 replies; only message in thread
From: Bob Halley @ 2002-09-17 10:35 UTC (permalink / raw)
  Cc: emacs-devel

I'm running RH 7.3 GNU/Linux, with current patches.  Kernel is Marcelo
2.4.19.  HW is dual athlon 1800 MP.

I'm running -current.  The change to unexelf.c (revision 1.49) causes
emacs to segfault when building it with "make bootstrap":

../src/bootstrap-emacs -batch --no-site-file --multibyte -l autoload --eval '(setq generated-autoload-file "/proj/src/emacs/lisp/loaddefs.el")' -f batch-update-autoloads $wins
Directories: /proj/src/emacs/lisp /proj/src/emacs/lisp/calc /proj/src/emacs/lisp/calendar /proj/src/emacs/lisp/emacs-lisp /proj/src/emacs/lisp/emulation /proj/src/emacs/lisp/eshell /proj/src/emacs/lisp/gnus /proj/src/emacs/lisp/international /proj/src/emacs/lisp/language /proj/src/emacs/lisp/mail /proj/src/emacs/lisp/net /proj/src/emacs/lisp/obsolete /proj/src/emacs/lisp/play /proj/src/emacs/lisp/progmodes /proj/src/emacs/lisp/term /proj/src/emacs/lisp/textmodes /proj/src/emacs/lisp/toolbar
make[1]: *** [autoloads] Error 139
make[1]: Leaving directory `/proj/src/emacs/lisp'
make: *** [bootstrap] Error 2

Investigation with gdb shows the segfault occurring when emacs tries
to strncmp (*p, "MALLOC_CHECK_=", 14) == 0) inside of
malloc_initialize_hook().  Everythings looks OK before the call to
strncmp, and 'p' is valid, but as soon as it is called it segfaults
and the stack frame is trashed (or weird):

(gdb) where
#0  0x40014852 in _r_debug () from /usr/X11R6/lib/libXaw3d.so.7
#1  0x080d364b in malloc_initialize_hook () at emacs.c:707
#2  0x420799ba in ptmalloc_init () from /lib/i686/libc.so.6
#3  0x4207dfa4 in malloc_hook_ini () from /lib/i686/libc.so.6
#4  0x4207a0ad in malloc () from /lib/i686/libc.so.6
#5  0x421156bb in __register_frame () from /lib/i686/libc.so.6
#6  0x4201740a in __libc_global_ctors () from /lib/i686/libc.so.6
#7  0x4201748a in init () from /lib/i686/libc.so.6
#8  0x4000b782 in _dl_init_internal () from /lib/ld-linux.so.2

I have no idea what _r_debug() is, or why gdb thinks that is what was
called (or why it was called instead of strncmp(), if that is what
happened).

This happens with RH's gcc (2.96-112), and with gcc 3.2.

If I revert the unexelf.c to version 1.48 and then build, everything
works OK again.

I do not understand enough about ELF to offer suggestions about
unexelf.c.

/Bob

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-09-17 10:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-17 10:35 unexelf.c 1.49 causes segfault Bob Halley

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.