diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-10-19 20:17:58 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-10-19 20:17:58 -0700 |
commit | b50d160363fd8f2c84b23b03a5f5e9d22911693e (patch) | |
tree | 56c923546d836054b14b667e1a2cd7d35d039d6e | |
parent | 8637782953f3eedcf7ff0499983c8c52bb0a3651 (diff) | |
download | txr-b50d160363fd8f2c84b23b03a5f5e9d22911693e.tar.gz txr-b50d160363fd8f2c84b23b03a5f5e9d22911693e.tar.bz2 txr-b50d160363fd8f2c84b23b03a5f5e9d22911693e.zip |
* match.c (match_fun): Bugfix: replace incorrect plain return
with debug_return. This causes a stray debug frame to be left
on the environment stack which turns to garbage, leading to
an invalid longjmp in another debug_return elsewhere
which tries to use that frame. This was diagnosed by valgrind
indicating accesses below the stack frame, and also by glibc
"longjmp causes uninitialized stack frame" abort.
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | match.c | 2 |
2 files changed, 11 insertions, 1 deletions
@@ -1,5 +1,15 @@ 2014-10-19 Kaz Kylheku <kaz@kylheku.com> + * match.c (match_fun): Bugfix: replace incorrect plain return + with debug_return. This causes a stray debug frame to be left + on the environment stack which turns to garbage, leading to + an invalid longjmp in another debug_return elsewhere + which tries to use that frame. This was diagnosed by valgrind + indicating accesses below the stack frame, and also by glibc + "longjmp causes uninitialized stack frame" abort. + +2014-10-19 Kaz Kylheku <kaz@kylheku.com> + * parser.l (lisp_parse): Bugfix: the error_stream argument must be checked to be a stream before we plant it in place of std_error, otherwise we will get a type exception thrown @@ -4019,7 +4019,7 @@ val match_fun(val name, val args, val input, val files) ret = v_fun(&c); if (ret == nil) - return nil; + debug_return (nil); if (ret == decline_k) sem_error(nil, lit("match_fun: function ~s not found"), name, nao); |