Non constant malloc bug using deque, erase broken