From: kosmirror <kos...@us...> - 2025-06-19 22:31:04
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via dd4514b72ac9e5a96660e5078c975c613d999300 (commit) from 12bdacd1c44d843a7eac1b4dacb835a7d88cf145 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit dd4514b72ac9e5a96660e5078c975c613d999300 Author: QuzarDC <qu...@co...> Date: Thu Jun 19 05:19:19 2025 -0400 Ensure that the thread's return can fit in the variable provided. `thd_join` is meant to take a `void **` by passing instead `bool *` you could get all sorts of bad stuff when the data overflows the bool. ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/basic/threading/barrier/barrier.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/dreamcast/basic/threading/barrier/barrier.c b/examples/dreamcast/basic/threading/barrier/barrier.c index b7f13c06..51b1de2a 100644 --- a/examples/dreamcast/basic/threading/barrier/barrier.c +++ b/examples/dreamcast/basic/threading/barrier/barrier.c @@ -134,8 +134,8 @@ int main(int argc, char* argv[]) { printf("Joining threads...\n"); for(unsigned t = 0; t < THREAD_COUNT - 1; ++t) { - bool thread_ret; - const int ret = thd_join(threads[t], (void**)&thread_ret); + void *thread_ret; + const int ret = thd_join(threads[t], &thread_ret); if(ret) { fprintf(stderr, "Failed to join thread %u with code: %d!\n", hooks/post-receive -- A pseudo Operating System for the Dreamcast. |