[net.unix-wizards] Segmentation Violation & V7 shell

lfm@ukc.UUCP (04/20/84)

We discovered an interesting fact about the operation of the V7 shell
whilst playing with our PERQ's. The Bourne shell detects the need to
grab some more memory space by trapping the Segmentation Violation
error caused by accessing out of bounds. However it assumes that after
claiming more space it can restart the interrupted operation where it
left off....... On the PERQ this doesnt happen!!! So you get weird
truncations of long parameter lists. Anyone know of any other programs
that could be affected by this problem??

  Lindsay F. Marshall
    uucp : ...!{mcvax,vax135}!ukc!lfm
    ARPA : Lindsay_Marshall%NEWCASTLE@MIT-MULTICS
    post : Computing Laboratory, U of Newcastle upon Tyne, U.K.
           +44 - 632 - 329233 xtn 212

fair@dual.UUCP (Erik E. Fair) (04/22/84)

UniSoft ran into just the same problem when they ported the Bourne
Shell to the 68000 processor. They ended up making extensive changes to
Bourne Shell to make it work in a sensible fashion, and, to the best of
my knowledge, this is the only program which exhibited such behaviour.

	Erik E. Fair	ucbvax!fair	fair@ucb-arpa.ARPA

	dual!fair@Berkeley.ARPA
	{ihnp4,ucbvax,cbosgd,decwrl,amd70,fortune,zehntel}!dual!fair
	Dual Systems Corporation, Berkeley, California

gwyn@BRL-VLD.ARPA (04/23/84)

From:      Doug Gwyn (VLD/VMB) <gwyn@BRL-VLD.ARPA>

I hope that the PERQ doesn't grow the user stack by the same method
that fails to extend the program break (inability to restart faulting
instruction)!

The only UNIX utility I know of that uses this incredibly kludgy
method of memory allocation is the Bourne shell.  Now that a good fast
malloc() is supplied with UNIX (both 4.2BSD and SysVRel2), I would
like to see the Bourne shell changed to do sensible memory allocation.
Does anyone know whether the Korn shell is any better about this?