From: Bob Halley <halley@play-bow.org>
Cc: emacs-devel@gnu.org
Subject: unexelf.c 1.49 causes segfault
Date: 17 Sep 2002 03:35:29 -0700 [thread overview]
Message-ID: <m3fzw8rjim.fsf@woof.play-bow.org> (raw)
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
reply other threads:[~2002-09-17 10:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3fzw8rjim.fsf@woof.play-bow.org \
--to=halley@play-bow.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.