rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Vincent Broman <broman@nosc.mil>
To: rc@hawkwind.utcs.toronto.edu
Subject: Re: "rc" shell maintainer?
Date: Thu, 5 Feb 1998 16:48:31 -0500	[thread overview]
Message-ID: <19980205214831.17917.qmail@np.nosc.mil> (raw)
In-Reply-To: <XhgAAI2m2TSjHwwA@nan.cygnus.co.uk> (message from Tim Goodwin on Thu, 5 Feb 1998 11:46:00 +0000)

-----BEGIN PGP SIGNED MESSAGE-----

I tried out rc-1.5b2 on my SunOS 4.1.3 (with most Sun patches) machine
and gcc-2.7.2, and I got a core dump during trip.  Any suggestions?

Program received signal SIGSEGV, Segmentation fault.
0xf773470c in malloc ()
(gdb) bt
#0  0xf773470c in malloc ()
#1  0xa55c in ealloc (n=12) at nalloc.c:115
#2  0x7398 in get_var_place (s=0xc8f8 "*", stack=TRUE) at hash.c:151
#3  0xc80c in varassign (name=0xc8f8 "*", def=0x1b814, stack=TRUE) at var.c:18
#4  0xcc18 in starassign (dollarzero=0x1b838 "", a=0x1b810, stack=TRUE)
    at var.c:143
#5  0x239c in funcall (av=0x1b800) at builtins.c:77
#6  0x3d0c in exec (s=0x2374, parent=TRUE) at exec.c:90
#7  0xd494 in walk (n=0x1b788, parent=TRUE) at walk.c:37
#8  0x8694 in doit (execit=TRUE) at input.c:296
#9  0x9fa4 in main (argc=2, argv=0xf7ffef4c, envp=0xf7ffef50) at main.c:98

This appears to bomb in malloc while the argument list is being set up
to execute "submatch 'umask bad' 'bad umask' 'bad umask'".
I have essentially no trouble on another SunOS 4.1.4 machine
with the same source code.
This problem occurs with readline, editline, or nothing added.
The following are the only local changes I've made.

- --- config.h.in.orig	Mon Jul  7 08:43:53 1997
+++ config.h.in	Wed Feb  4 15:40:59 1998
@@ -2,4 +2,5 @@
 #undef STDC_HEADERS
 
+#undef HAVE_SYS_TYPES_H
 #undef HAVE_SYS_RESOURCE_H
 #undef RLIMIT_NEEDS_KERNEL
- --- configure.in.orig	Mon Jul  7 08:43:53 1997
+++ configure.in	Wed Feb  4 16:48:10 1998
@@ -277,10 +277,14 @@
 AC_ARG_WITH(editline, [  --with-editline         Simmule Turner's line editing],
 	AC_CHECK_LIB(edit, readline,
- -		AC_DEFINE(READLINE) LIBS="$LIBS -ledit",
+		AC_DEFINE(READLINE)
+		LIBS="-ledit $LIBS",
 		AC_MSG_WARN(editline library not found)))
 
 AC_ARG_WITH(readline, [  --with-readline         Bloated GNU line editing],
+	AC_CHECK_LIB(termcap,tputs,LIBS="-ltermcap $LIBS",
+		AC_CHECK_LIB(ncurses,tputs,LIBS="-lncurses $LIBS"))
 	AC_CHECK_LIB(readline, readline,
- -		AC_DEFINE(READLINE) LIBS="$LIBS -lreadline -ltermcap",
+		AC_DEFINE(READLINE)
+		LIBS="-lreadline $LIBS",
 		AC_MSG_WARN(readline library not found)))
 
- --- which.c.orig	Mon Jul  7 08:43:53 1997
+++ which.c	Wed Feb  4 17:02:32 1998
@@ -20,5 +20,5 @@
 #define X_ALL (X_USR|X_GRP|X_OTH)
 
- -extern int stat(const char *, struct stat *);
+extern int stat(char *, struct stat *);
 
 static bool initialized = FALSE;
@@ -88,5 +88,5 @@
 		gid = getegid();
 #if HAVE_GETGROUPS
- -		ngroups = getgroups(0, (gid_t *)0);
+		ngroups = getgroups(0, (GETGROUPS_T *)0);
 		gidset = malloc(ngroups * sizeof(gid_t));
 		if (!gidset)


Vincent Broman,   code D712 Bayside
Space and Naval Warfare Systems Center, San Diego              (was NOSC, NRaD)
San Diego, CA  92152-6145,  USA                          Phone: +1 619 553 1641
Email: broman at spawar.navy.mil or nosc.mil      PGP protected mail preferred.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBNNozTGCU4mTNq7IdAQGtUwP/W/hnkSZKulAZhodR7+b3fX+M1WnISqLp
XHB614mZVY0prcuoPpf0sXwb4nxLu3R03PhXCsymGnxzmyPR9nzqY+zOjniZd8SA
ow6h59DBPA3Or5ULOWJfeSC/+K53s7dXwbS1FH9QkclF/hhICd1u6Uzf5A6pa+ND
8l3Anxd9/X8=
=28Zb
-----END PGP SIGNATURE-----


  reply	other threads:[~1998-02-06  0:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-04 21:23 Vincent Broman
1998-02-05  1:17 ` Tom Culliton
1998-02-05 11:46 ` Tim Goodwin
1998-02-05 21:48   ` Vincent Broman [this message]
1998-02-06 18:00     ` Tim Goodwin
1998-02-06 22:54       ` Vincent Broman
1998-02-09 20:31       ` Vincent Broman
1998-02-09 23:45       ` Vincent Broman
1998-02-10 23:26         ` Tom Culliton
1998-02-11 10:45           ` Tim Goodwin
1998-02-11 22:23             ` Tom Culliton
1998-02-12 10:23               ` Tim Goodwin
1998-02-11 21:55           ` Vincent Broman
1998-02-05  5:01 smarry
1998-02-05 15:25 ` Tom Culliton
1998-02-06 17:45 ` Tim Goodwin
1998-02-05 19:59 smarry

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=19980205214831.17917.qmail@np.nosc.mil \
    --to=broman@nosc.mil \
    --cc=rc@hawkwind.utcs.toronto.edu \
    /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.
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 NNTP newsgroup(s).