Still not able to find any obvious double-frees happening. Starting to suspect a struct being copied over to another and one of them left dangling, is that the right term? The ones I looked at seemed to be deep copies, but perhaps there should have been a point where the pointer to the original structure should have been set to NULL? This is something that going to require going over with a pair of eyeballs and tracking the lifetimes.
Compilation Flags = -Wall -Wextra -Wpedantic -Wsystem-headers -Wno-error=gnu-include-next -Wstack-protector -fstack-protector-strong -Werror -Wno-error=unused-parameter -Wno-unused-parameter -fno-omit-frame-pointer -ftrapv
vm.malloc_conf=SFJRUVXD
ktrace -aBdi -tcisStux bin/circle
The resultant debug files are rather large, but here are the tail -n 100 of the ktrace dumps and the btrace as well.
and a flame graph