caught XDM using uninit memory: s/malloc/calloc/g