<div dir="ltr">When I compiled the ckh unit test with a newer version of clang, it was crashing. I tracked the problem down to an implicit assumption that a value passed to chk_search is 4 byte aligned. Specifically, the code in test/unit/ckh.c, the test test_count_insert_search_remove, makes this call:<div><br></div><div><div><font face="monospace, monospace">  assert_true(ckh_search(&ckh, missing, NULL, NULL),</font></div><div><font face="monospace, monospace">      "Unexpected ckh_search() success");</font></div></div><div><br></div><div>The problem is that the definition of missing is:</div><div><br></div><div><font face="monospace, monospace">  char *missing = "A string not in the hash table.";</font></div><div><br></div><div>Which means missing is not guaranteed to be of any alignment.</div><div><br></div><div>I'm not sure on what platforms jemalloc needs to be compiled, so I think that something like this:</div><div><font face="monospace, monospace"><br></font></div><div><div><font face="monospace, monospace">  #define HASH_TABLE_STRING "A string not in the hash table."</font></div></div><div><font face="monospace, monospace">  union { char char_data[sizeof(HASH_TABLE_STRING)]; uint32_t uint_data; } missing;<br></font></div><div><div><font face="monospace, monospace">  memcpy(missing.char_data, HASH_TABLE_STRING, sizeof(HASH_TABLE_STRING));</font></div></div><div><font face="monospace, monospace">  .</font></div><div><font face="monospace, monospace">  .</font></div><div><font face="monospace, monospace">  .</font></div><div><div><font face="monospace, monospace">  assert_true(ckh_search(&ckh, missing.char_data, NULL, NULL),</font></div><div><font face="monospace, monospace">      "Unexpected ckh_search() success");</font></div></div><div><br></div><div>Would guarantee the needed alignment.</div><div><br></div><div>Does this seem reasonable?</div><div><br></div><div>Christopher</div></div>