Bourne sh, 68k's and segment traps

jk jk at plx.UUCP
Thu Jun 14 10:09:00 AEST 1984


I am interested in hearing about solutions others have used for
instruction restarts on 68000's. My current "challange" is the
Bourne shell and the way it catches SIGSEGV's and sbrk()'s to
grow its data space. We currently have code in our kernel that
tries to match the saved instruction register with some number of
instructions before the (bogus) saved pc. This works in most cases,
like automatic stack extension. It fails miserably if it finds
the right opcode but it is not the correct instruction or it is
not the opcode field of an instruction. In the case of the sh
this is disaterous as the sh blindly sbrk()'s more space, returns
from the signal catching code to re-execute the wrong instruction
again, sbrk()'s for more space.....boom, boom out go the lights.

Has anyone got a good solution for this problem?
Thanks in advance,

		(no cute signoff yet)

jk
..!decvax!sun!plx!jk



More information about the Comp.unix.wizards mailing list