summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-10-19 20:17:58 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-10-19 20:17:58 -0700
commitb50d160363fd8f2c84b23b03a5f5e9d22911693e (patch)
tree56c923546d836054b14b667e1a2cd7d35d039d6e
parent8637782953f3eedcf7ff0499983c8c52bb0a3651 (diff)
downloadtxr-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--ChangeLog10
-rw-r--r--match.c2
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a01c0ef0..6be88a89 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/match.c b/match.c
index ce45b51a..4e136967 100644
--- a/match.c
+++ b/match.c
@@ -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);