On 14 December 2012 21:07, demerphq <demerphq@gmail.com> wrote: > On 14 December 2012 14:16, Dave Mitchell <davem@iabyn.com> wrote: >> On Thu, Dec 13, 2012 at 11:09:40PM -0800, Andreas J. Koenig via RT wrote: >>> I have no bisect for this one because the test result is random: >>> sometimes OK, sometimes SEGV. I saw it the first time happen with >>> v5.17.6-281-g01f4497. The test script that triggered it was >>> t/010_internals/100_threads.t. I just ran the test with v5.17.6 a >>> hundred times without crash, so I suppose the problem stems from some >>> commit after that. >> >> Given that its crashing while freeing a hash, perhaps the randomness of >> the crash is related to the new hash randomisation. In which case you >> could run it with the env var PERL_HASH_SEED_DEBUG=1, then when it >> crashes, note the hash seed that was displayed at start up: >> >> HASH_FUNCTION = ONE_AT_A_TIME HASH_SEED = 0xd460791e >> >> and then use that seed for the bisect: >> >> PERL_HASH_SEED=d460791e ./perl ... >> >> >> Although Yves, I've just noticed that this seems to be a bit buggy: > > Actually no. The output here is as expected. Although maybe this hasnt > been properly documented. See the delta for 5.17.6 for the > documentation I did do. Ill try to improve the docs. > > But basically the seed is populated from the left, and omitted bits > default to 0. This was done to make it easier to handle to arbitrary > seed sizes. IOW, it isnt a number, its a string in hex. Consider that > Siphash uses two 64 bit seeds, and other hash functions could have an > arbitrary number of bits in their seeds. I have played around with > hash functions that use very large "seeds". > > >> $ PERL_HASH_SEED=1 PERL_HASH_SEED_DEBUG=1 p -e 1 >> HASH_FUNCTION = ONE_AT_A_TIME HASH_SEED = 0x10000000 >> >> $ PERL_HASH_SEED=0x1 PERL_HASH_SEED_DEBUG=1 p -e 1 >> HASH_FUNCTION = ONE_AT_A_TIME HASH_SEED = 0x00000000 > > Perhaps we should warn that we encountered an unexpected non-hex digit > in this case. > >> $ PERL_HASH_SEED=f PERL_HASH_SEED_DEBUG=1 p -e 1 >> HASH_FUNCTION = ONE_AT_A_TIME HASH_SEED = 0xf0000000 >> >> $ PERL_HASH_SEED=100 PERL_HASH_SEED_DEBUG=1 p -e 1 >> HASH_FUNCTION = ONE_AT_A_TIME HASH_SEED = 0x10000000 >> >> $ PERL_HASH_SEED=10000 PERL_HASH_SEED_DEBUG=1 p -e 1 >> HASH_FUNCTION = ONE_AT_A_TIME HASH_SEED = 0x10000000 >> >> $ PERL_HASH_SEED=1000000 PERL_HASH_SEED_DEBUG=1 p -e 1 >> HASH_FUNCTION = ONE_AT_A_TIME HASH_SEED = 0x10000000 >> >> $ PERL_HASH_SEED=10000000 PERL_HASH_SEED_DEBUG=1 p -e 1 >> HASH_FUNCTION = ONE_AT_A_TIME HASH_SEED = 0x10000000 >> >> $ PERL_HASH_SEED=100000000 PERL_HASH_SEED_DEBUG=1 p -e 1 >> HASH_FUNCTION = ONE_AT_A_TIME HASH_SEED = 0x10000000 So: $ PERL_HASH_SEED_DEBUG=1 ./perl -e1 HASH_FUNCTION = ONE_AT_A_TIME HASH_SEED = 0x442be56b $ PERL_HASH_SEED_DEBUG=1 PERL_HASH_SEED=442be56b ./perl -e1 HASH_FUNCTION = ONE_AT_A_TIME HASH_SEED = 0x442be56b These are IMO undesirable $ PERL_HASH_SEED_DEBUG=1 PERL_HASH_SEED=0x442be56b ./perl -e1 HASH_FUNCTION = ONE_AT_A_TIME HASH_SEED = 0x00000000 $ PERL_HASH_SEED_DEBUG=1 PERL_HASH_SEED=442fnorble ./perl -e1 HASH_FUNCTION = ONE_AT_A_TIME HASH_SEED = 0x442f0000 So I will fix them. Yves -- perl -Mre=debug -e "/just|another|perl|hacker/"Thread Previous | Thread Next