[libcxx-commits] [libcxx] [libc++][hardening] Enable comparator checks for safe mode too (PR #66458)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Sep 18 04:58:49 PDT 2023
zmodem wrote:
> @nico or @zmodem, do you have any input on whether this would affect Chromium's use of this build mode?
I think @nico has followed this more closely, but IIUC we used to ship the old asserts mode (`_LIBCPP_ENABLE_ASSERTIONS`) and have now switched to the new safe mode (`_LIBCPP_ENABLE_SAFE_MODE`) . It sounds like in that transition we lost these comparator checks in production builds.
What are the implications of a bad comparator? Could it cause an algorithm to go off the rails in an unsafe way, e.g. returning an out-of-bounds element, or would it "just" lead to returning an incorrect result (or fail to return)?
https://github.com/llvm/llvm-project/pull/66458
More information about the libcxx-commits
mailing list