diff --git a/pod/perldiag.pod b/pod/perldiag.pod index e972ba6dfbde..fb7a028ecc27 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -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 diff --git a/util.c b/util.c index f1871452023c..bf294b3d40fc 100644 --- a/util.c +++ b/util.c @@ -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; @@ -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 */