[libcxx-commits] [PATCH] D125184: [libc++] work around std::to_string() and _LIBCPP_DEBUG == 1 crashing

Luboš Luňák via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun May 8 04:28:29 PDT 2022


llunak updated this revision to Diff 427924.
llunak retitled this revision from "[libc++] fix std::to_string() crashing with _LIBCPP_DEBUG ==  1" to "[libc++] work around std::to_string() and _LIBCPP_DEBUG == 1  crashing".
llunak edited the summary of this revision.
llunak added a comment.

I see. Until that some time, how about at least this one then? It's admitedly ugly, but still less ugly then crashing later after the function has been called.

Also, while you'll be at reworking this stuff, I suggest also putting the debug versions of the affected classes in their own namespace, like libstdc++ AFAIK does. That would have made problems like this obvious, and it would also make obvious when using debug mode together with C++ libraries that have not been built that way (currently it'll just crash without any indication).

In fact, unless you for some strange reason care about ABI for debug mode, you could do that even now, and then you wouldn't need an extra library nor care about how libc++ has been built.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125184/new/

https://reviews.llvm.org/D125184

Files:
  libcxx/include/string

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125184.427924.patch
Type: text/x-patch
Size: 4547 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220508/d3edbc44/attachment.bin>


More information about the libcxx-commits mailing list