Skip to content

ghash: fix bug introduced by valgrind fix

Allison Karlitskaya requested to merge wip/desrt/more-ghash-valgrind into master

g_hash_table_new_full() had an invocation of g_hash_table_realloc_key_or_value_array() with the @is_big argument incorrectly hardcoded to FALSE, even though later in the function the values of have_big_keys and have_big_values would be set conditionally.

This never caused problems before because on 64bit platforms, this would result in the allocation of a guint-sized array (which would be fine, as have_big_keys and have_big_values would always start out as false) and on 32bit platforms, this function ignored the value and always allocated a gpointer-sized array.

Since merge request !845 (merged) we have the possibility for have_big_keys and have_big_values to start out as TRUE on 64bit platforms. We need to make sure we pass the argument through correctly.

Merge request reports