diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-04-11 21:08:06 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-04-11 21:08:06 -0700 |
commit | 97294a20f0121b5edd0e709375a5c18d013d258e (patch) | |
tree | 6b27697bf15fb4a3e2a136d7ac667118658c3037 /libsigsegv/src | |
parent | 5a0d83f4b42b9ca28cc6b8dd190a570c47b203c8 (diff) | |
download | egawk-97294a20f0121b5edd0e709375a5c18d013d258e.tar.gz egawk-97294a20f0121b5edd0e709375a5c18d013d258e.tar.bz2 egawk-97294a20f0121b5edd0e709375a5c18d013d258e.zip |
@let: bugfix: two free lists are needed.
When functions containing let are compiled, they leave nodes on
the let_free list. These nodes are of the wrong type for re-use
by the compilation of an external @let. That causes a crash.
Secondly, when we compile a function, we free the let_free list.
This is also bad, because if it contains nodes allocated by
the compilation of external lets, we would like those to be
re-used for subsequent external lets after that function, and
not to allocate new variables.
* awkgram.y (let_gfree): New static variable.
(statement): In the aftermath of the @let statement, when
returning the variable nodes to the free list, we now choose
which of the two free lists to return to based on whether
we are inside a function.
(add_let): Try to allocate from let_free if a function is
being compiled, otherwise from let_gfree.
Diffstat (limited to 'libsigsegv/src')
0 files changed, 0 insertions, 0 deletions