unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
@ 2007-08-08 17:06 Philippe Waroquiers
  2007-08-09  5:24 ` Richard Stallman
  0 siblings, 1 reply; 6+ messages in thread
From: Philippe Waroquiers @ 2007-08-08 17:06 UTC (permalink / raw)
  To: bug-gnu-emacs

In an hpterm (or in an xterm), emacs core dumps if DISPLAY is not set.
When DISPLAY is set, emacs startups properly.

(gdb) bt
#0  0xc020cc68 in kill () from /usr/lib/libc.2
#1  0x0013e6e8 in fatal_error_signal ()
#2  <signal handler called>
#3  0x00276d40 in _free_internal ()
#4  0x002778b0 in free ()
#5  0x001cef50 in emacs_blocked_free ()
#6  0x0027789c in free ()
#7  0x001ce564 in xfree ()
#8  0x000e4f00 in tty_default_color_capabilities ()
#9  0x000e5cac in term_init ()
#10 0x00040a84 in init_display ()
#11 0x0014042c in main ()
(gdb)

(note: bt full gives the same results, but with only some additional
error messages telling 'No symbol table info available.'.
xbacktrace command is not found).


In GNU Emacs 22.1.1 (hppa1.1-hp-hpux11.11, Motif Version 2.1.0)
 of 2007-08-04 on bobcat
Windowing system distributor `Hewlett-Packard Company', version 11.0.600000
configured using `configure  'hppa1.1-hp-hpux11.11' '--prefix=/cm/ot/TOOL/GNU!12.43/build_G!67.IP.11/generated' '--exec-prefix=/cm/ot/TOOL/GNU!12.43/build_G!67.IP.11/generated/libexec/emacs-22.1' '--mandir=/cm/ot/TOOL/GNU!12.43/build_G!67.IP.11/generated/man' '--with-gcc=no' '--with-xpm' '--with-x11r6' '--with-x-toolkit=motif' '--x-libraries=/usr/lib/X11R6:/usr/contrib/X11R6/lib' 'build_alias=hppa1.1-hp-hpux11.11' 'host_alias=hppa1.1-hp-hpux11.11' 'target_alias=hppa1.1-hp-hpux11.11' 'CFLAGS=-g -Ae +O0 +DA1.1' 'LDFLAGS= -L/cm/ot/TOOL/GNU!12.43/build_G!67.IP.11/generated/work/emacs-22.1/xpm-3.4k/lib' 'CPPFLAGS=-I/cm/ot/TOOL/GNU!12.43/build_G!67.IP.11/generated/work/emacs-22.1/xpm-3.4k ''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  locale-coding-system: nil
  default-enable-multibyte-characters: nil

Major mode: Lisp Interaction

Minor modes in effect:
  iswitchb-mode: t
  show-paren-mode: t
  which-function-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <menu-bar> <help-menu> <report-emacs-b
ug>

Recent messages:
Loading gpc...done
Loading gnuserv-compat...
Loading cl-macs...done
Loading gnuserv-compat...done
isearch-forwardisearch-backwardisearch-forward-regexpisearch-backward-regexpquery-replacequery-replace-regexpreplace-regexpreplace-string
Loading gnat-fix-error...done
Loading version_emacs_startup...done
Loading /cm/ot/TOOL/GNU!12.43/build_G!67.IP.11/generated/share/emacs/22.1/site-lisp/emacs_startup.el (source)...done
Loading easy-mmode...done
Loading emacsbug...done


-- 
Philippe WAROQUIERS                  Eurocontrol - Central Flow Management Unit
philippe.waroquiers@eurocontrol.int  Rue de la fusee, 96
Tel: +32 2 729 97 35                 1130 Brussels
Fax: +32 2 729 90 22                 Belgium
____

This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.

Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy.

Any views expressed in this message are those of the sender.

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

* Re: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
  2007-08-08 17:06 emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set Philippe Waroquiers
@ 2007-08-09  5:24 ` Richard Stallman
  2007-08-09  7:39   ` WAROQUIERS Philippe
  2007-09-04  9:58   ` WAROQUIERS Philippe
  0 siblings, 2 replies; 6+ messages in thread
From: Richard Stallman @ 2007-08-09  5:24 UTC (permalink / raw)
  To: philippe.waroquiers; +Cc: bug-gnu-emacs

Please try to debug it and find the cause.
First I suggest recompiling using -g.

    (note: bt full gives the same results, but with only some additional
    error messages telling 'No symbol table info available.'.
    xbacktrace command is not found).

That means the .gdbinit file wasn't found or didn't work.
Please try to figure out why.

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

* RE: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
  2007-08-09  5:24 ` Richard Stallman
@ 2007-08-09  7:39   ` WAROQUIERS Philippe
  2007-09-04  9:58   ` WAROQUIERS Philippe
  1 sibling, 0 replies; 6+ messages in thread
From: WAROQUIERS Philippe @ 2007-08-09  7:39 UTC (permalink / raw)
  To: rms; +Cc: bug-gnu-emacs

>Please try to debug it and find the cause.
>First I suggest recompiling using -g.
>That means the .gdbinit file wasn't found or didn't work.
>Please try to figure out why.

.gdbinit was not found because I was not in the good directory.

After recompiling with debug and using gdb, I was able to see
what is happening, and tested a fix.

The problem is that when emacs starts up without DISPLAY, it calls
the function tty_default_color_capabilities.
For a reason not clear to me (my knowledge of C is *very* rusty),
the static local variables in tty_default_color_capabilities are
not properly initialized to NULL or 0 at startup.

I first tried to just put a  " = NULL;" and a "= 0;"
but that did not solve the problem.

At the end, the problem was solved by moving the static variables
just before the function tty_default_color_capabilities 
(and also initializing them to NULL/0).

In other words, the below fixes the problem:

/* Save or restore the default color-related capabilities of this
   terminal.  */
  static char
    *default_orig_pair, *default_set_foreground, *default_set_background
= NULL; /* need init ??? */
  static int default_max_colors, default_max_pairs,
default_no_color_video = 0; /* need init ??? */
static void
tty_default_color_capabilities (save)
     int save;
{

  if (save)
    {
      if (default_orig_pair)


As I do not understand too much the problem, if you need any other
investigation, I can
always see what I can do.

Thanks for your help ...



____

This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.

Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy.

Any views expressed in this message are those of the sender.


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

* RE: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
  2007-08-09  5:24 ` Richard Stallman
  2007-08-09  7:39   ` WAROQUIERS Philippe
@ 2007-09-04  9:58   ` WAROQUIERS Philippe
  2007-09-04 22:58     ` Richard Stallman
  1 sibling, 1 reply; 6+ messages in thread
From: WAROQUIERS Philippe @ 2007-09-04  9:58 UTC (permalink / raw)
  To: rms; +Cc: bug-gnu-emacs

I have done a test to see if emacs compiles and runs properly
when commenting the
#define static
line in s/hpux.h

I tested with the below versions of hp-ux and c compiler.
The emacs was properly configured/compiled with the below change
in hpux.h.
I started the resulting emacs on an X display and on a tty.
With this basic test, everything seems ok.
Conclusion: hpux 11.11 and the below version of the compiler
does not have a problem with the "static".

Hoping this helps ...


/* #define static ??? test if still needed for hp-ux 11.11 */
/* tested with the below
wao@steer: cc -V bidule.c
cpp.ansi: HP92453-01 B.11.X.35175-35176.GP HP C Preprocessor (ANSI)
ccom: HP92453-01 B.11.X.35098-35101.GP HP C Compiler
cc: "bidule.c", line 1: warning 501: Empty source file.
/usr/ccs/bin/ld: 92453-07 linker linker ld B.11.58 060929
/usr/ccs/bin/ld: Unsatisfied symbols:
   main (Not referenced yet! Probably due to -u option)
wao@steer: uname -a
HP-UX steer B.11.11 U 9000/800 2316717407 unlimited-user license
wao@steer:
*/
____

This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.

Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy.

Any views expressed in this message are those of the sender.


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

* Re: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
  2007-09-04  9:58   ` WAROQUIERS Philippe
@ 2007-09-04 22:58     ` Richard Stallman
  2007-09-05  2:03       ` Glenn Morris
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2007-09-04 22:58 UTC (permalink / raw)
  To: WAROQUIERS Philippe; +Cc: bug-gnu-emacs

That is useful information -- thanks.  To see what conclusions we can
draw from it, I need some more info:

Is HPUX 11.11 the current version?

How many years ago was HPUX 11.11
released?

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

* Re: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
  2007-09-04 22:58     ` Richard Stallman
@ 2007-09-05  2:03       ` Glenn Morris
  0 siblings, 0 replies; 6+ messages in thread
From: Glenn Morris @ 2007-09-05  2:03 UTC (permalink / raw)
  To: rms; +Cc: bug-gnu-emacs, WAROQUIERS Philippe

Richard Stallman wrote:

> Is HPUX 11.11 the current version?
>
> How many years ago was HPUX 11.11 released?

According to the internet, it was released in 2000 and is 3 or 4
versions old.

I looked for non-file scope statics in src/*.c. I think there are only
a handful that aren't definitely in Windows, Mac, or VMS specific code:

grep -E '^[ \t]+static ' *.c | grep -Ev '^(w32|msdos|mac)'

alloca.c      find_stack_direction
fringe.c      init_fringe_bitmap
gtkutil.c     menu_grab_callback, xg_separator_p
image.c       our_memory_fill_input_buffer, gif_load
xselect.c     x_reply_selection_request


Not relevant:

emacs.c (commment), getloadavg.c (vms), regex.c (not emacs),
strftime.c (indented file scope), sunfns.c, sysdep.c (vms), unexsunos4.c

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

end of thread, other threads:[~2007-09-05  2:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-08 17:06 emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set Philippe Waroquiers
2007-08-09  5:24 ` Richard Stallman
2007-08-09  7:39   ` WAROQUIERS Philippe
2007-09-04  9:58   ` WAROQUIERS Philippe
2007-09-04 22:58     ` Richard Stallman
2007-09-05  2:03       ` 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).