[libc-commits] [PATCH] D148293: [LIBC] Fix incorrect handling of `pthread_join(tid, nullptr)`

Noah Goldstein via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Apr 20 11:37:23 PDT 2023


goldstein.w.n added a comment.

In D148293#4282901 <https://reviews.llvm.org/D148293#4282901>, @sivachandra wrote:

> Sorry for more work, but this change is required for proper functioning of https://reviews.llvm.org/D148291, which has already landed. So, can you just prepare patch for the `nullptr` handling and not make it depend on the attributes patch? Or, make the tests in the patch not use the detach functionality. Either way, we should land this patch with some urgency.

Oh shoot, forgot about the dependency when I pushed!

Updated v2 so no deps. If any issue I can just revert D148291 <https://reviews.llvm.org/D148291>



================
Comment at: libc/test/integration/src/pthread/pthread_join_test.cpp:57
+    unsigned rval;
+    ASSERT_EQ(__llvm_libc::getrandom(&rval, sizeof(rval), 0),
+              static_cast<ssize_t>(sizeof(rval)));
----------------
sivachandra wrote:
> We should not use randomized inputs/data in unit tests because we want them to be reproducible.
Switched with fixed seed `rand`. That should be reproducible.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148293/new/

https://reviews.llvm.org/D148293



More information about the libc-commits mailing list