diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-06-05 19:59:37 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-06-05 19:59:37 -0700 |
commit | f64eaa8c6839247c4e3023d244fdc328fd455e8d (patch) | |
tree | 4a9a52e4c56eee31ff330c40cb0e8be381c3c067 /lib.c | |
parent | c6d3a92f68f91ef3fee09e8d2051ae066162482d (diff) | |
download | txr-f64eaa8c6839247c4e3023d244fdc328fd455e8d.tar.gz txr-f64eaa8c6839247c4e3023d244fdc328fd455e8d.tar.bz2 txr-f64eaa8c6839247c4e3023d244fdc328fd455e8d.zip |
mapcar/maprod: fix stack overflow regression.
The recent refactoring of the mapping functions to use
stack-allocated iterators has a bug. args_decl occurs inside a
loop. But args_decl uses alloca, which doesn't dispose of the
memory when the block scope terminates.
* eval.c (map_common, prod_common): Move the declaration of
args_fun outside of the loop, so that it is allocated just
once. The loop just stuffs fresh sets of values into the
arguments.
Diffstat (limited to 'lib.c')
0 files changed, 0 insertions, 0 deletions