summary refs log tree commit diff
path: root/src/arith_yacc.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2018-12-14 13:44:14 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2019-02-25 12:51:53 +0800
commit2bc6caace3b08024955ed57fc993d91067f883a1 (patch)
tree99bd8ae3035ad029b758a2e9471c8710f487ddae /src/arith_yacc.c
parentsystem: Disable glibc warning on sigsetmask (diff)
downloaddash-2bc6caace3b08024955ed57fc993d91067f883a1.tar.gz
dash-2bc6caace3b08024955ed57fc993d91067f883a1.zip
eval: avoid leaking memory associated with redirections
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 issue was reported for BusyBox ash which is derived from dash:

  https://bugs.busybox.net/show_bug.cgi?id=7748

Signed-off-by: Ron Yorston <rmy@frippery.org>

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.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'src/arith_yacc.c')
0 files changed, 0 insertions, 0 deletions
s='logsubject'>Add DCH to shottyJune McEnroe This makes htop mostly work. Scrolling region still missing. 2019-07-12Support insert mode in shottyJune McEnroe This is how curses puts characters into the bottom-right cell of the terminal. 2019-07-11Don't do carriage return on line feedJune McEnroe 2019-07-11Interpret 256color-style SGRsJune McEnroe 2019-07-11Use inline style rather than <b>, <i>, <u>June McEnroe 2019-07-11Factor out clearJune McEnroe 2019-07-11Add bright option to shottyJune McEnroe 2019-07-11Output <b>, <i>, <u> in shottyJune McEnroe 2019-07-10Ignore SM and RMJune McEnroe 2019-07-09Add shotty man page and build itJune McEnroe 2019-07-09Add up -cJune McEnroe 2019-07-09Add options for default colors to shottyJune McEnroe 2019-07-08Use char literals consistentlyJune McEnroe