From c9432811a5fb0403448f277e259bfbefa84524f2 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 26 Sep 2014 23:51:06 +0300 Subject: [PATCH] states: add an assert I hit this condition while i was writing some recent code and this assert would have helped me debug it faster. Also it feels like I have had these sorts of bugs often in the past. Signed-off-by: Dan Carpenter --- smatch_states.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/smatch_states.c b/smatch_states.c index 8dd6ab74..feb29b08 100644 --- a/smatch_states.c +++ b/smatch_states.c @@ -140,6 +140,8 @@ void __push_fake_cur_stree(void) struct stree *__pop_fake_cur_stree(void) { + if (!fake_cur_stree_stack) + sm_msg("INTERNAL error: popping too many fake cur strees."); __use_pre_cond_states(); return pop_stree(&fake_cur_stree_stack); } -- 2.11.4.GIT