* rc and null environ strings
@ 1992-10-08 20:58 Donn Cave
0 siblings, 0 replies; only message in thread
From: Donn Cave @ 1992-10-08 20:58 UTC (permalink / raw)
To: rc
Am having this problem with rc version 1.4:
; A = '' ./rc
; whatis A
A=''
; A = ralph
segmentation violation--core dumped
;
In other words, assigning to a zero-length variable is fatal. However, this
happens only after reading that (zero-length) value (hence the "whatis" in
the example). Trace back looks like this:
(gdb) where
#0 0xbc2e in free ()
#1 0x68bc in efree (p=(int *) 0x212d) (nalloc.c line 135)
#2 0x5eba in listfree (p=(struct List *) 0x177d8) (list.c line 17)
#3 0x3d31 in get_var_place (s=(char *) 0x167d4 , stack=FALSE) (hash.c line 157)#4 0x8485 in varassign (name=(char *) 0x167d4 , def=(struct List *) 0x16804, stack=FALSE) (var.c line 18)
#5 0x3156 in assign (s1=(struct List *) 0x16810, s2=(struct List *) 0x16804, stack=FALSE) (glom.c line 163)
#6 0x9264 in walk (n=(struct Node *) 0x167f8, parent=TRUE) (walk.c line 160)
#7 0x4cb6 in doit (execit=TRUE) (input.c line 332)
#8 0x63f3 in main (argc=1, argv=(char **) 0x3fffdccc, envp=(char **) 0x3fffdcd4
Platform is DYNIX/ptx on a Sequent 2000/750. The value of p->w, passed to
efree() at list.c line 17, looks uninitialized to me, but that's as far as
I have taken it.
rc 1.2 doesn't have this problem, although it oddly can't find zero-length
variables passed in in the environment. "es" works fine.
Donn Cave, University Computing Services, University of Washington
donn@cac.washington.edu
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1992-10-08 20:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1992-10-08 20:58 rc and null environ strings Donn Cave
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).