develooper Front page | perl.perl5.porters | Postings from August 2018

Request for assistance: PL_top_env and JMPENV

Thread Next
Paul "LeoNerd" Evans
August 15, 2018 10:26
Request for assistance: PL_top_env and JMPENV
Message ID:
Hi all,

I'm continuing to hunt bugs and improve the state of Future-AsyncAwait.
Today I'm running into some confusion around the way that JMPENVs work,
which are used to implement the die() ability across C stacks.

In particular, I have a question about what the PL_top_env variable is
supposed to store. I don't find much documentation about it, but from a
reading of the code, I believe the following statement is an
always-true invariant:

  PL_top_env is always equal to the value of cx->blk_eval.cur_top_env of
  the topmost CXt_EVAL frame (or PL_start_env if such a frame doesn't

If that's supposed to be the case, then somewhere in my code I've
managed to break it (because the topmost frame is an CXt_EVAL whose
cur_top_env is not equal to PL_top_env). But having looked it over, I
can't see what I'm doing differently in this case as compared lots of
other CPAN modules, so confusion persists.

My full situation involves die() and eval frames and all sorts of
complication, but before I get into that I'd like first to understand
PL_top_env and the jumpstacks first, to see if my bug is me doing
something silly.

Thanks all,

Paul "LeoNerd" Evans      |  |

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About