Branch: refs/heads/yves/fix_setjmp_warning_doeval_compile
  Home:   https://github.com/Perl/perl5
  Commit: e7bd9c362de2964e7f024e68dd99541e3f061ac3
      
https://github.com/Perl/perl5/commit/e7bd9c362de2964e7f024e68dd99541e3f061ac3
  Author: Yves Orton <demer...@gmail.com>
  Date:   2022-09-05 (Mon, 05 Sep 2022)

  Changed paths:
    M pp_ctl.c

  Log Message:
  -----------
  pp_ctl.c - move "UNITCHECK in an eval" JMPENV_PUSH() logic to a function

This creates S_try_run_unitcheck(), which is similar to S_try_yyparse(),
in that it runs the subs in PL_unitcheckav inside of a JMPENV_PUSH() and
JMPENV_POP wrapper so that any call to Perl_croak() inside of one of the
blocks ends back in the right place. This is used to handle UNITCHECK
blocks defined inside of an eval STRING which is compiled and executed
as part of doeval_compile() in pp_ctl.c

Both of these functions are private to pp_ctl.c and not listed in
embed.c and are used to trap the setjmp/longjmp calls and handle
exceptions during eval.

This fixes a cryptic warning about a variable being used across setjmp
in pp_ctl.c doeval_compile(), which turns out to be evalcv. By wrapping
the JMPENV_PUSH logic in a light wrapper these issues are moved one
layer down the stack and avoided.


Reply via email to