In dig for iOS I want to be able to invoke the dig "main" function multiple times so that I can improve its error handling. However, when I try, I get a segfault in line 181 of lib/dns/dst_api.c, which calls: isc_mem_setdestroycheck(dst__memory_pool, ISC_FALSE); I've attached a standalone test program to reproduce this fault (the config.h therein is from my macOS build).