About ‘free(): invalid next size (fast)’ or 'double free or corruption (out)

It’s more likely an upstream GMT bug. Please post a minimum example so that we can reproduce the issue.