Index: src/string/api.c =================================================================== --- src/string/api.c (revision 43141) +++ src/string/api.c (working copy) @@ -290,7 +290,8 @@ if (interp->parent_interpreter) { interp->hash_seed = interp->parent_interpreter->hash_seed; } - else { + /* interp is initialized from zeroed memory, so this is fine */ + else if (interp->hash_seed == 0) { /* TT #64 - use an entropy source once available */ Parrot_srand(Parrot_intval_time()); interp->hash_seed = Parrot_uint_rand(0); Index: compilers/imcc/main.c =================================================================== --- compilers/imcc/main.c (revision 43141) +++ compilers/imcc/main.c (working copy) @@ -218,6 +218,7 @@ " -h --help\n" " -V --version\n" " -I --include add path to include search\n" + " -H --hash-seed specify hex value to use as hash seed\n" " -L --library add path to library search\n" " -X --dynext add path to dynamic extension search\n" " \n" @@ -292,6 +293,7 @@ { 'D', 'D', OPTION_optional_FLAG, { "--parrot-debug" } }, { 'E', 'E', (OPTION_flags)0, { "--pre-process-only" } }, { 'G', 'G', (OPTION_flags)0, { "--no-gc" } }, + { 'H', 'H', OPTION_required_FLAG, { "--hash-seed" } }, { 'I', 'I', OPTION_required_FLAG, { "--include" } }, { 'L', 'L', OPTION_required_FLAG, { "--library" } }, { 'O', 'O', OPTION_optional_FLAG, { "--optimize" } }, @@ -427,6 +429,11 @@ case 'G': IMCC_INFO(interp)->gc_off = 1; break; + case 'H': + if (opt.opt_arg && is_all_hex_digits(opt.opt_arg)) { + interp->hash_seed = strtoul(opt.opt_arg, NULL, 16); + } + break; case '.': /* Give Windows Parrot hackers an opportunity to * attach a debuggger. */ fgetc(stdin);