all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 21.2 startup crash on Irix
@ 2002-04-12 18:02 Dave Love
  2002-04-13  7:58 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Love @ 2002-04-12 18:02 UTC (permalink / raw)


This crash happens reading my .emacs with both a cc and gcc build of
Emacs 21.2 on Irix 6.5.15m + development utilities 7.3.  It doesn't
happen if I isolate the code fragment that triggers it, and I guess
it's just a symptom of lossage elsewhere that I can't track down
immediately.  It doesn't happen with 21.1 newly built in the same
circumstances.

[Reverting the dubious-looking changes to unexelf.c for .got sections
doesn't help, but I don't see how that would be correct and it's not
necessary on any of the versions I've tested Emacs on for several
years.]


Program received signal SIGSEGV, Segmentation fault.
0xfab0a0c in atoi () at clnt_udp.c:629
629     clnt_udp.c: No such file or directory.
(gdb) bt 9
#0  0xfab0a0c in atoi () at clnt_udp.c:629
#1  0x1018c458 in Fformat (nargs=2, args=0x7fff1044)
    at /home/fx/packages/emacs-21.2-21.2.orig/src/editfns.c:3339
#2  0x1018b8e8 in Fmessage (nargs=2, args=0xaa254)
    at /home/fx/packages/emacs-21.2-21.2.orig/src/editfns.c:2960
#3  0x101969b8 in Ffuncall (nargs=2, args=0x10349f68)
    at /home/fx/packages/emacs-21.2-21.2.orig/src/eval.c:2640
#4  0x101d31e4 in Fbyte_code (bytestr=808141312, vector=2, maxdepth=2147422272)
    at /home/fx/packages/emacs-21.2-21.2.orig/src/bytecode.c:716
#5  0x10196de8 in funcall_lambda (fun=1076576700, nargs=4, 
    arg_vector=0x7fff1264)
    at /home/fx/packages/emacs-21.2-21.2.orig/src/eval.c:2851
#6  0x10196674 in Ffuncall (nargs=2, args=0x7fff1260)
    at /home/fx/packages/emacs-21.2-21.2.orig/src/eval.c:2707
#7  0x101961f8 in call4 (fn=696916, arg1=34, arg2=115, arg3=67240924, 
    arg4=274645648) at /home/fx/packages/emacs-21.2-21.2.orig/src/eval.c:2521
#8  0x101b2aa8 in Fload (file=811744212, noerror=272194564, 
    nomessage=272194564, nosuffix=272194612, must_suffix=272194564)
    at /home/fx/packages/emacs-21.2-21.2.orig/src/lread.c:789
(More stack frames follow...)
(gdb) up
#1  0x1018c458 in Fformat (nargs=2, args=0x7fff1044)
    at /home/fx/packages/emacs-21.2-21.2.orig/src/editfns.c:3339
3339              minlen = atoi (format);
(gdb) p format
$13 = (unsigned char *) 0x102b44cd "s (source)...done"
(gdb) p *args
$14 = 808142004
(gdb) pr
"Loading %s (source)...done"
(gdb) f 8
#8  0x101b2aa8 in Fload (file=811744212, noerror=272194564, 
    nomessage=272194564, nosuffix=272194612, must_suffix=272194564)
    at /home/fx/packages/emacs-21.2-21.2.orig/src/lread.c:789
789               val = call4 (Vload_source_file_function, found, file,
(gdb) p Vload_source_file_function
$15 = 272626788
(gdb) pr
load-with-code-conversion
(gdb) p found
$16 = 811744228
(gdb) pr
"/dl/sr/projects/px/scr1/fx/lib-src/fns-21.2.3.el"
(gdb) p file
$17 = 811744212
(gdb) pr
"/dl/sr/projects/px/scr1/fx/lib-src/fns-21.2.3.el"
(gdb) xback
0x102a2990 "message"
0x102b40e8 "load-with-code-conversion"
0x1029de14 "load"
0x102acf94 "load-symbol-file-load-history"
0x102acf44 "eval-after-load"
0x1029de2c "eval-buffer"
0x102b40e8 "load-with-code-conversion"
0x1029de14 "load"
0x4032f528 2048
0x102a0d10 "byte-code"
0x1032e8b8 "command-line"
0x1032d1d0 "normal-top-level"
(gdb) 

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

* Re: 21.2 startup crash on Irix
  2002-04-12 18:02 21.2 startup crash on Irix Dave Love
@ 2002-04-13  7:58 ` Eli Zaretskii
  2002-04-16 21:27   ` Dave Love
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2002-04-13  7:58 UTC (permalink / raw)
  Cc: bug-gnu-emacs

> From: Dave Love <d.love@dl.ac.uk>
> Date: 12 Apr 2002 19:02:14 +0100
> 
> #1  0x1018c458 in Fformat (nargs=2, args=0x7fff1044)
>     at /home/fx/packages/emacs-21.2-21.2.orig/src/editfns.c:3339
> 3339              minlen = atoi (format);
> (gdb) p format
> $13 = (unsigned char *) 0x102b44cd "s (source)...done"
> (gdb) p *args
> $14 = 808142004
> (gdb) pr
> "Loading %s (source)...done"

Does this problem go away if you set the environment variable
LD_BIND_NOW to 1 before starting Emacs?

If this helps, please try the change suggested yesterday by Robert A
Basch <rbasch@MIT.EDU> in the thread "Emacs 21 mmap problem" in this
group.

Thanks.

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

* Re: 21.2 startup crash on Irix
  2002-04-13  7:58 ` Eli Zaretskii
@ 2002-04-16 21:27   ` Dave Love
  2002-04-17  4:53     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Love @ 2002-04-16 21:27 UTC (permalink / raw)
  Cc: bug-gnu-emacs

"Eli Zaretskii" <eliz@is.elta.co.il> writes:

> Does this problem go away if you set the environment variable
> LD_BIND_NOW to 1 before starting Emacs?

I would have to rebuild it to find out, but that could only cover up
something seriously broken.

> If this helps, please try the change suggested yesterday by Robert A
> Basch <rbasch@MIT.EDU> in the thread "Emacs 21 mmap problem" in this
> group.

I'm not reading a group.  Please send a reference I can follow if you
want me to read it.  However, I had backed out the mmap changes as
well as the .got ones to no effect.

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

* Re: 21.2 startup crash on Irix
  2002-04-16 21:27   ` Dave Love
@ 2002-04-17  4:53     ` Eli Zaretskii
  2002-04-19 17:42       ` Dave Love
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2002-04-17  4:53 UTC (permalink / raw)
  Cc: bug-gnu-emacs

> From: Dave Love <d.love@dl.ac.uk>
> Date: 16 Apr 2002 22:27:50 +0100
> 
> > If this helps, please try the change suggested yesterday by Robert A
> > Basch <rbasch@MIT.EDU> in the thread "Emacs 21 mmap problem" in this
> > group.
> 
> I'm not reading a group.  Please send a reference I can follow if you
> want me to read it.

Since I wrote that, Gerd installed a change (on RC as well), so you
can have it with "cvs up".  I attach the diffs for the release branch
below.

> However, I had backed out the mmap changes as well as the .got ones
> to no effect.

The changes I had in mind are not related to unexec, as you will see
from the diffs.

2002-04-16  Gerd Moellmann  <gerd@gnu.org>

	* buffer.c (MMAP_ALLOCATED_P): New macro to be set from system
	configuration files.
	(mmap_enlarge): Enlarge mapped regions only if MMAP_ALLOCATED_P
	returns 0.

Index: src/buffer.c
===================================================================
RCS file: /cvs/emacs/src/buffer.c,v
retrieving revision 1.358.4.3
retrieving revision 1.358.4.4
diff -u -r1.358.4.3 -r1.358.4.4
--- src/buffer.c	28 Jan 2002 16:56:03 -0000	1.358.4.3
+++ src/buffer.c	16 Apr 2002 07:36:19 -0000	1.358.4.4
@@ -1,5 +1,5 @@
 /* Buffer manipulation primitives for GNU Emacs.
-   Copyright (C) 1985,86,87,88,89,93,94,95,97,98, 1999, 2000, 2001
+   Copyright (C) 1985,86,87,88,89,93,94,95,97,98, 1999, 2000, 2001, 2002
 	Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -4277,6 +4277,18 @@
 
 #define MEM_ALIGN	sizeof (double)
 
+/* Predicate returning true if part of the address range [START ..
+   END[ is currently mapped.  Used to prevent overwriting an existing
+   memory mapping.
+
+   Default is to conservativly assume the address range is occupied by
+   something else.  This can be overridden by system configuration
+   files if system-specific means to determine this exists.  */
+
+#ifndef MMAP_ALLOCATED_P
+#define MMAP_ALLOCATED_P(start, end) 1
+#endif
+
 /* Function prototypes.  */
 
 static int mmap_free_1 P_ ((struct mmap_region *));
@@ -4369,16 +4381,13 @@
     }
   else if (npages > 0)
     {
-      struct mmap_region *r2;
-      
       nbytes = npages * mmap_page_size;
       
       /* Try to map additional pages at the end of the region.  We
 	 cannot do this if the address range is already occupied by
 	 something else because mmap deletes any previous mapping.
 	 I'm not sure this is worth doing, let's see.  */
-      r2 = mmap_find (region_end, region_end + nbytes);
-      if (r2 == NULL)
+      if (!MMAP_ALLOCATED_P (region_end, region_end + nbytes))
 	{
 	  POINTER_TYPE *p;

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

* Re: 21.2 startup crash on Irix
  2002-04-17  4:53     ` Eli Zaretskii
@ 2002-04-19 17:42       ` Dave Love
  0 siblings, 0 replies; 5+ messages in thread
From: Dave Love @ 2002-04-19 17:42 UTC (permalink / raw)
  Cc: bug-gnu-emacs

"Eli Zaretskii" <eliz@is.elta.co.il> writes:

> Since I wrote that, Gerd installed a change (on RC as well), so you
> can have it with "cvs up".  I attach the diffs for the release branch
> below.

I don't see how that can be the problem since it didn't change between
21.1 and 21.2, which is when the lossage occurred.

If there's a problem fixing the address range with mmap, you can still
use the first arg of mmap as a hint and see if the mapping is done
there.

[I'm sure it would be better to use DL malloc to replace gmalloc and
use that more generally rather than worrying about explicit mmaps
there.]

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

end of thread, other threads:[~2002-04-19 17:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-12 18:02 21.2 startup crash on Irix Dave Love
2002-04-13  7:58 ` Eli Zaretskii
2002-04-16 21:27   ` Dave Love
2002-04-17  4:53     ` Eli Zaretskii
2002-04-19 17:42       ` Dave Love

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.