[Bug c++/60371] std::vector::emplace_back
dilyan.palauzov at aegee dot org
gcc-bugzilla@gcc.gnu.org
Fri Feb 28 22:10:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60371
--- Comment #3 from Дилян Палаузов <dilyan.palauzov at aegee dot org> ---
Indeed, adding
z (const z& x) { var = strdup (x.var); }
solves the problem. However, I don't understand how that "y.clear();" between
the y.emplace_back() in the original program avoids the double free.
More information about the Gcc-bugs
mailing list