From 110e155595d397e5328f6f7af33e430d1a361bbc Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 9 Mar 2014 23:52:20 -0700 Subject: * match.c (v_trailer): Fix segfault. The code which helps implement the special interaction between @(accept) and @(trailer) was not handling the situation when there is not current unwind exit point. --- ChangeLog | 7 +++++++ match.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8e548a89..ca9ae1ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2014-03-09 Kaz Kylheku + + * match.c (v_trailer): Fix segfault. The code which + helps implement the special interaction between @(accept) and + @(trailer) was not handling the situation when there is not + current unwind exit point. + 2014-03-09 Kaz Kylheku * parser.l: Syntactic tweak. Do not allow the "extra" diff --git a/match.c b/match.c index a82f47da..9b2a6900 100644 --- a/match.c +++ b/match.c @@ -2129,7 +2129,7 @@ static val v_trailer(match_files_ctx *c) */ uw_unwind { uw_frame_t *ex = uw_current_exit_point(); - if (ex->uw.type == UW_BLOCK && ex->bl.protocol == accept_s) + if (ex && ex->uw.type == UW_BLOCK && ex->bl.protocol == accept_s) rplacd(ex->bl.result, cons(c->data, c->data_lineno)); } -- cgit v1.2.3