aboutsummaryrefslogtreecommitdiff
path: root/libbb/wfopen.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2019-02-25 08:29:38 +0000
committerDenys Vlasenko <vda.linux@googlemail.com>2019-02-25 18:57:59 +0100
commitf55161ad27b641f6e09c6c498fa8a2bdb1112b0a (patch)
tree8ea2b3a9922ffd0b3fc8b47b7a997130e80bb7ce /libbb/wfopen.c
parente563f9e851c78f5c13cb9828ddb11ca981fd6331 (diff)
downloadbusybox-f55161ad27b641f6e09c6c498fa8a2bdb1112b0a.tar.gz
ash: eval: avoid leaking memory associated with redirections. Closes 7748
The following constructs result in ever-increasing memory usage: while true; do { true; } </dev/null; done while true; do ( true; ) </dev/null; done For comparison, bash displays static memory usage in both cases. This has been fixed in dash by commit 2bc6caa. The maintainer writes: I have simplified evaltree so that it simply sets the stack mark unconditionally. This allows us to remove the stack marks in the functions called by evaltree. Closes BusyBox bug 7748. function old new delta evaltree 606 632 +26 evalcommand 1724 1696 -28 evalcase 382 351 -31 evalfor 230 196 -34 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: 26/-93) Total: -67 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/wfopen.c')
0 files changed, 0 insertions, 0 deletions