Module Name: src
Committed By: martin
Date: Sat Jul 20 15:35:01 UTC 2024
Modified Files:
src/lib/libpthread [netbsd-10]: pthread.c
Log Message:
Pull up following revision(s) (requested by rin in ticket #757):
lib/libpthread/pthread.c: revision 1.182
Use snprintf_ss in pthread__assertfunc and update comment in
pthread__errorfunc. snprintf can use locks in some code paths and we
only care about the restricted subset here.
To generate a diff of this commit:
cvs rdiff -u -r1.181.2.2 -r1.181.2.3 src/lib/libpthread/pthread.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libpthread/pthread.c
diff -u src/lib/libpthread/pthread.c:1.181.2.2 src/lib/libpthread/pthread.c:1.181.2.3
--- src/lib/libpthread/pthread.c:1.181.2.2 Thu Jun 20 18:22:47 2024
+++ src/lib/libpthread/pthread.c Sat Jul 20 15:35:01 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread.c,v 1.181.2.2 2024/06/20 18:22:47 martin Exp $ */
+/* $NetBSD: pthread.c,v 1.181.2.3 2024/07/20 15:35:01 martin Exp $ */
/*-
* Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008, 2020
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread.c,v 1.181.2.2 2024/06/20 18:22:47 martin Exp $");
+__RCSID("$NetBSD: pthread.c,v 1.181.2.3 2024/07/20 15:35:01 martin Exp $");
#define __EXPOSE_STACK 1
@@ -1076,10 +1076,10 @@ pthread__assertfunc(const char *file, in
int len;
/*
- * snprintf should not acquire any locks, or we could
+ * snprintf_ss should not acquire any locks, or we could
* end up deadlocked if the assert caller held locks.
*/
- len = snprintf(buf, 1024,
+ len = snprintf_ss(buf, 1024,
"assertion \"%s\" failed: file \"%s\", line %d%s%s%s\n",
expr, file, line,
function ? ", function \"" : "",
@@ -1109,7 +1109,7 @@ pthread__errorfunc(const char *file, int
va_end(ap);
/*
- * snprintf should not acquire any locks, or we could
+ * snprintf_ss should not acquire any locks, or we could
* end up deadlocked if the assert caller held locks.
*/
len = snprintf_ss(buf, sizeof(buf),