Branch: refs/heads/yves/fix_setjmp_warning_doeval_compile
  Home:   https://github.com/Perl/perl5
  Commit: dbf0cd9c039cfa74b853c3ac7faa83a09329c7b3
      
https://github.com/Perl/perl5/commit/dbf0cd9c039cfa74b853c3ac7faa83a09329c7b3
  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 JMPENV_PUSH to a function similar to S_try_yyparse

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 a
unitcheck block executed as part of eval compilation ends back in the
right place.

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