Ticket #116: pathological_case.patch

File pathological_case.patch, 0.6 KB (added by Infinoid, 13 years ago)

Load the hash seed with a known-bad value, to make the test fail every time.

  • src/string.c

    commit a56dff0a2a776d1d7ad652e8a5e1cf9672d5d44f
    Author: Mark Glines <mark@glines.org>
    Date:   Fri Jan 2 15:25:51 2009 -0800
    
        Make the hash crash consistent by forcing a known-bad hash seed.
    
    diff --git a/src/string.c b/src/string.c
    index dc5810c..70d3384 100644
    a b  
    293293    else { 
    294294        /* TT #64 - use an entropy source once available */ 
    295295        Parrot_srand(Parrot_intval_time()); 
    296         interp->hash_seed = Parrot_uint_rand(0); 
     296        interp->hash_seed = 211392511; 
    297297    } 
    298298 
    299299    /* Set up the cstring cache, then load the basic encodings and charsets */