Add diagnostics for PERL_HASH_SEED warning
authorYves Orton <demerphq@gmail.com>
Fri, 14 Dec 2012 22:14:48 +0000 (23:14 +0100)
committerYves Orton <demerphq@gmail.com>
Fri, 14 Dec 2012 22:14:48 +0000 (23:14 +0100)
pod/perldiag.pod
util.c

index 6589ca8..41030f8 100644 (file)
@@ -3875,6 +3875,12 @@ fix the problem, however, you will get the same error message each
 time you run Perl.  How to really fix the problem can be found in
 L<perllocale> section B<LOCALE PROBLEMS>.
 
+=item perl: warning: Non hex character in '$ENV{PERL_HASH_SEED}', seed only partially set
+
+(W) PERL_HASH_SEED should match /^\s*(?:0x)?[0-9a-fA-F]+\s*\z/ but it
+contained a non hex character. This could mean your hash randomization
+is not being set correctly.
+
 =item pid %x not a child
 
 (W exec) A warning peculiar to VMS.  Waitpid() was asked to wait for a
diff --git a/util.c b/util.c
index 4829042..12a6bf4 100644 (file)
--- a/util.c
+++ b/util.c
@@ -5681,7 +5681,7 @@ Perl_get_hash_seed(pTHX_ unsigned char *seed_buffer)
         while (isSPACE(*s))
            s++;
         if (*s && !isXDIGIT(*s)) {
-            Perl_warn(aTHX_ "perl: Non hex character in '$ENV{PERL_HASH_SEED}', seed only partially set\n");
+            Perl_warn(aTHX_ "perl: warning: Non hex character in '$ENV{PERL_HASH_SEED}', seed only partially set\n");
         }
         /* should we check for unparsed crap? */
     }