in reply to Can't locate auto/Net/SSLeay/SSL_alert_d.al
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can't locate auto/Net/SSLeay/SSL_alert_d.al
by kikuchiyo (Hermit) on May 12, 2023 at 13:24 UTC |