[libcxx-commits] [PATCH] D154626: [libc++] add basic runtime assertions to <barrier>
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jul 10 13:45:36 PDT 2023
ldionne requested changes to this revision.
ldionne added inline comments.
This revision now requires changes to proceed.
================
Comment at: libcxx/include/barrier:318
{
+ _LIBCPP_ASSERT_UNCATEGORIZED(__update > 0, "barrier:arrive must be called with a value greater than 0");
return __b_.arrive(__update);
----------------
I see this:
> The behavior is undefined if n is less than or equal to 0 or greater than the expected count for the current barrier phase.
It seems that we're not checking the second condition here. I think that's something we could check from `__barrier_base::arrive`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154626/new/
https://reviews.llvm.org/D154626
More information about the libcxx-commits
mailing list