Skip to content

The different xs_handshake() failures need distinct messages #19111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pod/perldiag.pod
Original file line number Diff line number Diff line change
Expand Up @@ -3420,7 +3420,7 @@ does when displayed.
\n line feed
\cK vertical tab

=item %s: loadable library and perl binaries are mismatched (got handshake key %p, needed %p)
=item %s: loadable library and perl binaries are mismatched (got %s handshake key %p, needed %p)

(P) A dynamic loading library C<.so> or C<.dll> was being loaded into the
process that was built against a different build of perl than the
Expand Down
6 changes: 4 additions & 2 deletions util.c
Original file line number Diff line number Diff line change
Expand Up @@ -5588,6 +5588,7 @@ Perl_xs_handshake(const U32 key, void * v_my_perl, const char * file, ...)
U32 items, ax;
void * got;
void * need;
const char *stage = "first";
#ifdef MULTIPLICITY
dTHX;
tTHX xs_interp;
Expand Down Expand Up @@ -5624,12 +5625,13 @@ Perl_xs_handshake(const U32 key, void * v_my_perl, const char * file, ...)
got = xs_spp;
need = &PL_stack_sp;
#endif
stage = "second";
if(UNLIKELY(got != need)) {
bad_handshake:/* recycle branch and string from above */
if(got != (void *)HSf_NOCHK)
noperl_die("%s: loadable library and perl binaries are mismatched"
" (got handshake key %p, needed %p)\n",
file, got, need);
" (got %s handshake key %p, needed %p)\n",
file, stage, got, need);
}

if(key & HSf_SETXSUBFN) { /* this might be called from a module bootstrap */
Expand Down