From b50d160363fd8f2c84b23b03a5f5e9d22911693e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 19 Oct 2014 20:17:58 -0700 Subject: * 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. --- ChangeLog | 10 ++++++++++ match.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a01c0ef0..6be88a89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2014-10-19 Kaz Kylheku + + * 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 * parser.l (lisp_parse): Bugfix: the error_stream argument 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); -- cgit v1.2.3