make incorrect uses of free() and malloc() call abort() on OSX