From: Alan T. DeKok Date: Thu, 7 Aug 2025 15:24:18 +0000 (-0400) Subject: catch pop on running trigger, with empty stack X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07ed4615bbe4e1a733b8cf286d06fac853f301c8;p=thirdparty%2Ffreeradius-server.git catch pop on running trigger, with empty stack --- diff --git a/src/lib/unlang/interpret.c b/src/lib/unlang/interpret.c index ea9d112b7a5..582c49d0080 100644 --- a/src/lib/unlang/interpret.c +++ b/src/lib/unlang/interpret.c @@ -999,6 +999,15 @@ CC_HINT(hot) rlm_rcode_t unlang_interpret(request_t *request, bool running) unlang_result_t section_result = frame->section_result; /* record the result of the frame before we pop it*/ DUMP_STACK; + + /* + * Triggers can run modules which pop, and then the stack is empty. + */ + if (unlikely(stack->depth == 0)) { + fr_assert(top_frame); + break; + } + /* * Head on back up the stack */