[libcxx-commits] [libcxx] [libc++][hardening] Classify assertions related to leaks and syscalls. (PR #77164)
Konstantin Varlamov via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jan 19 17:18:55 PST 2024
================
@@ -461,7 +461,7 @@ path __current_path(error_code* ec) {
Deleter deleter = &::free;
#else
auto size = ::pathconf(".", _PC_PATH_MAX);
- _LIBCPP_ASSERT_UNCATEGORIZED(size >= 0, "pathconf returned a 0 as max size");
+ _LIBCPP_ASSERT_VALID_EXTERNAL_API_CALL(size >= 0, "pathconf returned a 0 as max size");
----------------
var-const wrote:
I removed the assertion in favor of error reporting. There's an additional quirk that apparently `PATH_MAX` might not be available on z/OS which I presume false under the `#else` branch of the `#if defined(_LIBCPP_WIN32API) || defined(__GLIBC__) || defined(__APPLE__)` condition (it really comes down to the `__GLIBC__` define -- I don't know if lack of `glibc` can be used as a reliable indicator of z/OS).
https://github.com/llvm/llvm-project/pull/77164
More information about the libcxx-commits
mailing list