summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-06-05 19:59:37 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-06-05 19:59:37 -0700
commitf64eaa8c6839247c4e3023d244fdc328fd455e8d (patch)
tree4a9a52e4c56eee31ff330c40cb0e8be381c3c067 /lib.c
parentc6d3a92f68f91ef3fee09e8d2051ae066162482d (diff)
downloadtxr-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