On Thu, May 21, 2015 at 4:41 PM, MRAB <pyt...@mrabarnett.plus.com> wrote: > On 2015-05-21 23:17, Eric Snow wrote: >> The segfault is consistent if I use the same seed (e.g. 7): >> >> PYTHONHASHSEED=7 ./python -m test.regrtest -m test_basic >> test_configparser >> >> Some seeds always segfault and some seeds never segfault. >> > OK, another thought. > > In "_odict_get_index" again, you say that if the hash has changed, the dict > might've > been resized, but could the dict be resized _without_ the hash changing? > > Could the value of "keys" still become invalid even if the hash is the same?
Good question. The only way I can see here that the dict would resize is during re-entrance to the interpreter eval loop via Python code potentially triggered through the PyObject_Hash call. Also, there's no check for a changed hash. The code compares the size of ma_keys (effectively the dict keys hash table) against the size of of the odict "fast nodes" table. -eric _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com