But it is possible to trigger a similar error ...

The offending line wraps the call in eval, so this should not be causing it to crash.

I tried installing Net::SSLeay in a local 5.36 installation, and found this:

% $PERL -MNet::SSLeay -wle 'print Net::SSLeay::SSL_alert_desc_string_l +ong(1)' Can't locate auto/Net/SSLeay/SSL_alert_d.al in @INC (@INC contains: /o +pt/v5.36.0/lib/perl5/site_perl/5.36.0/x86_64-linux /opt/v5.36.0/lib/p +erl5/site_perl/5.36.0 /opt/v5.36.0/lib/perl5/5.36.0/x86_64-linux /opt +/v5.36.0/lib/perl5/5.36.0) at -e line 1. % $PERL -MNet::SSLeay -wle 'print eval { Net::SSLeay::SSL_alert_desc_s +tring_long(1) } || "not a crash"' not a crash

So it is odd that it is crashing for you: is it possible that it is getting reported due to some $SIG{__DIE__} in your code (eg to write errors to a log file), but still then getting caught by the eval so not actually dying?

In any case, I think it should initially be reported against the IO::Socket::SSL distribution, since they are calling an undocumented function in Net::SSLeay. Maybe that function was implemented in Perl in a previous version, but has since become unreachable now that it is implemented in XS.

I note that in other parts of IO::Socket::SSL they protect certain evals by preceding them with local $SIG{__DIE__};, and the fix here might be as simple as adding that near line 3685. However the authors will probably also want to rethink their logic here.

For your own code, note that you can detect whether you are in eval using the variable $^S. If you have $SIG{__DIE__} handlers it is often useful to look at that when deciding what the handler should do.

Hope this helps.


In reply to Re: Can't locate auto/Net/SSLeay/SSL_alert_d.al by hv
in thread Can't locate auto/Net/SSLeay/SSL_alert_d.al by kikuchiyo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.