From 4b43b375b7abae22070cd86bfc26a8222233150e Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Wed, 31 Jan 2024 13:24:56 -0500 Subject: check for overlapping pointers --- src/threads/cnd_wait.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/threads/cnd_wait.c') diff --git a/src/threads/cnd_wait.c b/src/threads/cnd_wait.c index dc929573..bee8ff2b 100644 --- a/src/threads/cnd_wait.c +++ b/src/threads/cnd_wait.c @@ -6,6 +6,8 @@ int cnd_wait(cnd_t *cond, mtx_t *mtx) { SIGNAL_SAFE(0); + ASSERT_NOOVERLAP(cond, sizeof(*cond), mtx, sizeof(*mtx)); + return pthread_cond_wait(cond, mtx) == 0 ? thrd_success : thrd_error; } -- cgit v1.2.1