in reply to SIGSEGV instead of "Not a hash ref" in destructor w/ FATAL => all

In recent versions of Perl, warnings says:

NOTE: FATAL warnings should be used with care, particularly FATAL => 'all'.

Libraries using warnings::warn for custom warning categories generally don't expect warnings::warn to be fatal and can wind up in an unexpected state as a result. For XS modules issuing categorized warnings, such unanticipated exceptions could also expose memory leak bugs.

Moreover, the Perl interpreter itself has had serious bugs involving fatalized warnings. For a summary of resolved and unresolved problems as of January 2015, please see this perl5-porters post.

Sounds like you may have run into just such a bug, in fact your code looks quite similar to that in #123398. Although it looks like there's a patch for that issue, the general recommendation would be to not use FATAL => 'all', especially in light of the additional reasons to avoid it listed in the documentation. If you wanted to submit a bug via perlbug, I would suspect that because of the above it won't get a high priority unless you provide a patch or can show that it also causes a problem when warnings aren't fatalized.

Replies are listed 'Best First'.
Re^2: SIGSEGV instead of "Not a hash ref" in destructor w/ FATAL => all
by halfcountplus (Hermit) on Jul 20, 2015 at 13:27 UTC

    Thanks for #123398; that definitely is it.

    There is a patch, and the last post there currently is about 5 weeks ago (June 8), when the bug status was switched to "pending release", which apparently means "we fixed the bug, but only in dev, and not yet in production".

    I only need/want `FATAL => all` in testing, so no big deal. Just nice to know definitively what the problem is.