unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* emacs-22.1 coredumps on HPUX 11i
@ 2007-08-15 15:51 Dimitry Kloper
  2007-08-16  0:43 ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Dimitry Kloper @ 2007-08-15 15:51 UTC (permalink / raw)
  To: bug-gnu-emacs

Hello

I apologise in case this bug was already reported.

Setup:
HPUX 11i
gcc 3.3.3
Source snapshot from http://ftp.gnu.org/gnu/emacs/emacs-22.1.tar.gz
./configure --prefix=/usr/local/emacs-22.1 --with-x-toolkit=lucid

[src]$ ./emacs -nw
Segmentation fault (core dumped)
[src]$ rm core
[src]$ gdb emacs
GNU gdb 5.3
Copyright 2002 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 "hppa2.0n-hp-hpux11.00"...
TERM = vt100
Breakpoint 1 at 0x17ebd8
(gdb) r -nw
Starting program: /usr/local/devel/dimka/emacs/emacs-22.1/src/emacs -nw

Program received signal SIGSEGV, Segmentation fault.
0x002a92a4 in _free_internal ()
(gdb) where
#0  0x002a92a4 in _free_internal ()
#1  0x002aa274 in free ()
#2  0x001ed49c in emacs_blocked_free ()
#3  0x002aa264 in free ()
#4  0x001eca98 in xfree ()
#5  0x000ee6b0 in tty_default_color_capabilities ()
#6  0x000ef650 in term_init ()
#7  0x0003e680 in init_display ()
#8  0x00150f24 in main ()
#9  0x77ee3460 in _start () from /usr/lib/libc.2
(gdb) k
Kill the program being debugged? (y or n) y
(gdb)

The problem appears to be in the uninitialized static pointers
default_orig_pair, default_set_foreground, default_set_background at the very
beginning of function  tty_default_color_capabilities() in term.c.

Indeed, simply initializing those to NULL values solves the core dump.
Here is the beginning of the fixed function:

static void
tty_default_color_capabilities (save)
     int save;
{
  static char
    *default_orig_pair = NULL,
    *default_set_foreground = NULL,
    *default_set_background = NULL;
....

Hope that helps

--
Dimitry Kloper
dimitry point kloper at gmail point com

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

end of thread, other threads:[~2007-08-17  7:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-15 15:51 emacs-22.1 coredumps on HPUX 11i Dimitry Kloper
2007-08-16  0:43 ` Glenn Morris
2007-08-17  7:25   ` Glenn Morris

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