Branch: refs/heads/blead
Home: https://github.com/Perl/perl5
Commit: 7b6e25e427217d8a3b03cf4c6718be36a0fc221d
https://github.com/Perl/perl5/commit/7b6e25e427217d8a3b03cf4c6718be36a0fc221d
Author: Nicholas Clark <[email protected]>
Date: 2021-09-09 (Thu, 09 Sep 2021)
Changed paths:
M pod/perldiag.pod
M util.c
Log Message:
-----------
The different xs_handshake() failures need distinct messages
xs_handshake() makes two different comparisons that on failure are reported
as "got handshake key %p, needed %p", with opaque hexadecimal values.
The first is the "actual" key as generated by the HS_KEY() macro, which
encodes various values such as sizeof(PerlInterpreter) and the API version.
The second is the address of the current thread's PerlInterpreter struct.
Either can fail, and before this commit they would fail with identical text.
Hence it wasn't obvious what the problem was, causing "confusion and delay"
if one tried to decode the hexadecimal output as the wrong thing. (For
example when it's actually pointers mismatching, but one tries to decode the
values into API version and structure size, assuming that the values were
the packed output from HS_KEY().)