Add -D_GLIBCXX_DEBUG to catch potential bugs