summaryrefslogtreecommitdiffstats
path: root/bin/sh/memalloc.h
diff options
context:
space:
mode:
authorcracauer <cracauer@FreeBSD.org>2000-08-16 10:39:43 +0000
committercracauer <cracauer@FreeBSD.org>2000-08-16 10:39:43 +0000
commit0a28a3436ddef5b200270a23d8de395cef74d655 (patch)
tree25ff2d6471b9dfc28f2b94134b41c648330b1304 /bin/sh/memalloc.h
parentfd45895cebe5b6c25dc13992350f3bf2a65d752a (diff)
downloadFreeBSD-src-0a28a3436ddef5b200270a23d8de395cef74d655.zip
FreeBSD-src-0a28a3436ddef5b200270a23d8de395cef74d655.tar.gz
From submitter:
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(). PR: bin/19983 Submitted by: Tor.Egge@fast.no Reviewed by: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
Diffstat (limited to 'bin/sh/memalloc.h')
-rw-r--r--bin/sh/memalloc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/sh/memalloc.h b/bin/sh/memalloc.h
index ab53a83..e3ca8be 100644
--- a/bin/sh/memalloc.h
+++ b/bin/sh/memalloc.h
@@ -41,6 +41,7 @@ struct stackmark {
struct stack_block *stackp;
char *stacknxt;
int stacknleft;
+ struct stackmark *marknext;
};
OpenPOWER on IntegriCloud