[Bug libstdc++/71945] Integer overflow in use counter of shared pointers

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jul 21 17:58:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71945

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
You also get undefined behaviour at 2bn objects when the signed _Atomic_word
overflows, and the weak count can also be forced to overflow. Doing so requires
allocating tens of GB of shared_ptr objects though.


More information about the Gcc-bugs mailing list