[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 5 17:07:09 PST 2024
================
@@ -621,7 +621,7 @@ void __permissions(const path& p, perms prms, perm_options opts, error_code* ec)
set_sym_perms = is_symlink(st);
if (m_ec)
return err.report(m_ec);
- _LIBCPP_ASSERT_UNCATEGORIZED(st.permissions() != perms::unknown, "Permissions unexpectedly unknown");
+ _LIBCPP_ASSERT_VALID_EXTERNAL_API_CALL(st.permissions() != perms::unknown, "Permissions unexpectedly unknown");
----------------
var-const wrote:
I'm not sure why we treat this as an error -- isn't it valid (if weird) for a user to set permissions to "unknown"? Or is there some context here that I'm missing that should guarantee that the permissions cannot be unknown?
https://github.com/llvm/llvm-project/pull/77164
More information about the libcxx-commits
mailing list