Seems that using .EXTRA_PREREQS can cause a segfault under the right
conditions.
in file.c, when"snap_deps" is called to process the EXTRA_PREREQS..
struct dep *prereqs = expand_extra_prereqs (lookup_variable
(STRING_SIZE_TUPLE(".EXTRA_PREREQS")));
/* Perform per-file snap operations. */
hash_map_arg(&files, snap_file, prereqs);
The "expand_extra_prereqs" function is allowed to insert values in the hash
table, and this can invalidate the loop in hash_map_arg
stack trace of the call:
snap_deps
hash_map_arg (loop happens here)
snap_file
expand_extra_prereqs
enter_file
hash_insert_at
hash_rehash (loop no longer valid)
causes a fairly consistent crash. I'm working on a minimal reproduction if
it's necessary, but allowing the table to be rehashed while iterating seems
like a problem.