[libcxx-commits] [PATCH] D96946: [libcxx][RFC] Unspecified behavior randomization in libcxx
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Nov 16 07:29:36 PST 2021
ldionne added inline comments.
================
Comment at: libcxx/include/__algorithm/shuffle.h:28
+#if defined(_LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY) || defined(_LIBCPP_BUILDING_LIBRARY)
+
----------------
danlark wrote:
> Question, windows DLLs were not able to build the tests without _LIBCPP_BUILDING_LIBRARY as I guess because of constructor/destructor ABI of trivial types, should I leave it like that?
>
> Linux and MacOS seem fine without it
Oh, I actually meant to leave a comment here but forgot. Let's include this unconditionally, in other words remove the `#if defined` altogether.
When `_LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY` is not used, this is simply going to be an unused type, which doesn't hurt. But at least we'll know it parses properly.
================
Comment at: libcxx/include/__config:876
+#else
+# define _LIBCPP_DEBUG_RANDOMIZE_RANGE(__first, __last) (void)0
+#endif
----------------
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96946/new/
https://reviews.llvm.org/D96946
More information about the libcxx-commits
mailing list