Subject: CVS commit: basesrc
To: None <source-changes@netbsd.org>
From: Christos Zoulas <christos@netbsd.org>
List: source-changes
Date: 11/01/2000 21:56:02
Module Name: basesrc
Committed By: christos
Date: Wed Nov 1 19:56:02 UTC 2000
Modified Files:
basesrc/bin/sh: main.c memalloc.c memalloc.h
Log Message:
PR/11283: Hubert Feyrer: random memory corruption executing commands:
Fix from FreeBSD:
growstackblock() sometimes relocates a stack_block considered empty
without properly relocating stack marks referencing that block.
The first call to popstackmark() with the unrelocated stack mark
as argument then causes sh to abort.
Relocating the relevant stack marks seems to solve this problem.
The patch changes the semantics of popstackmark() somewhat. It can
only be called once after a call to setstackmark(), thus cmdloop() in
main.c needs an extra call to setstackmark().
To generate a diff of this commit:
cvs rdiff -r1.38 -r1.39 basesrc/bin/sh/main.c
cvs rdiff -r1.22 -r1.23 basesrc/bin/sh/memalloc.c
cvs rdiff -r1.10 -r1.11 basesrc/bin/sh/memalloc.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.