This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
warn and fail on writes to SVf_UTF8 SVs
[perl5.git] / dump.c
diff --git a/dump.c b/dump.c
index c802732..fcc63fc 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -456,7 +456,8 @@ Perl_sv_peek(pTHX_ SV *sv)
        sv_catpv(t, "VOID");
        goto finish;
     }
-    else if (sv == (const SV *)0x55555555 || SvTYPE(sv) == 'U') {
+    else if (sv == (const SV *)0x55555555 || ((char)SvTYPE(sv)) == 'U') {
+        /* detect data corruption under memory poisoning */
        sv_catpv(t, "WILD");
        goto finish;
     }