in reply to Re: XS Error: Segfault with B::HooksAtRuntime
in thread XS Error: Segfault with B::HooksAtRuntime
Here's the reproducible code. The recursive sub is called enough times to trigger a context stack grow/realloc.
If this is run against a perl that has been built with -DDEBUGGING, you'll see the following assertion failure, which is Perl_cx_popeval() detecting that the current cx pointer has changed underneath it.------------------------- test.pl: use lib '.'; use Foo; ------------------------- Foo.pm: package Foo; use Bar; 1; ------------------------- Bar.pm: package Bar; use B::Hooks::AtRuntime 'after_runtime'; sub recurse { my $depth = shift; return if $depth < 0; recurse($depth -1); } sub import { after_runtime { recurse(20); } }
perl: inline.h:2921: Perl_cx_popeval: Assertion `CxTYPE(cx) == CXt_EVA +L' failed.
Dave.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: XS Error: Segfault with B::HooksAtRuntime
by Ovid (Cardinal) on Aug 08, 2022 at 07:04 UTC | |
by dave_the_m (Monsignor) on Aug 08, 2022 at 08:53 UTC |