[libcxx-commits] [PATCH] D125184: [libc++] fix std::to_string() crashing in debug mode

Luboš Luňák via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 24 22:39:20 PDT 2022


llunak added a comment.

In D125184#3516920 <https://reviews.llvm.org/D125184#3516920>, @philnik wrote:

> The new debug mode won't break the ABI of the current debug mode AFAIK. I don't know if we would actually keep these functions in the dylib, but I fear that will be the case if we add them silently now.

Exactly the same applies to this patch. This patch does not break the ABI of the current debug mode either. It only affects newly compiled code, just like the new debug mode will. If you intend to not break the current debug mode ABI, you'll need to keep the debug functions in that case as well (and I doubt these tiny wrappers would make a difference there).

> We are saying that the new debug should use the unstable ABI. While we don't guarantee ABI stability for the current debug mode, the ABI has been stable for a long time. This means that we would break users who depend on this.

I can't quite imagine who would actually require stable ABI for the debug mode, because I can't see why anyone would use debug mode for anything else than local test builds. The lack of namespacing for debug mode practically means everything using it has to be built from source, otherwise there'll be a risk of mixing such objects up and getting "mysterious" crashes. The debug mode makes code slow(er) and there are problems like this crash. I don't see why anyone would try to ship or deploy code built with debug mode enabled. Some vendors don't even ship debug mode enabled in libc++ itself. So who are supposed to be these users who depend on this?

But even if, what do you suggest then? Is the new debug mode going to be ready for LLVM15? It doesn't seem so. Are you going to ship an ABI-stable function that is known to crash?


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

https://reviews.llvm.org/D125184



More information about the libcxx-commits mailing list