NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/50087 CVS commit: [netbsd-7] src



The following reply was made to PR port-arm/50087; it has been noted by GNATS.

From: "Martin Husemann" <martin%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/50087 CVS commit: [netbsd-7] src
Date: Tue, 24 Nov 2015 17:37:16 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Tue Nov 24 17:37:16 UTC 2015
 
 Modified Files:
 	src/include [netbsd-7]: limits.h
 	src/lib/libc/stdlib [netbsd-7]: jemalloc.c
 	src/lib/libpthread [netbsd-7]: pthread.c pthread_int.h
 	    pthread_key_create.3 pthread_tsd.c
 	src/lib/libpthread_dbg [netbsd-7]: pthread_dbg.c
 
 Log Message:
 Pull up following revision(s) (requested by manu in ticket #829):
 	lib/libpthread_dbg/pthread_dbg.c: revision 1.43 (via patch)
 	lib/libpthread/pthread_int.h: revision 1.91-1.92 (via patch)
 	lib/libc/stdlib/jemalloc.c: revision 1.37-1.38
 	lib/libpthread/pthread_tsd.c: revision 1.12-1.14 (via patch)
 	include/limits.h: revision 1.34 (via patch)
 	lib/libpthread/pthread.c: revision 1.146-1.147 (via patch)
 	lib/libpthread/pthread_key_create.3: revision 1.7 (via patch)
 
 libpthread:
 
 Make PTHREAD_KEYS_MAX dynamically adjustable
 NetBSD's PTHREAD_KEYS_MAX is set to 256, which is low compared to
 other systems like Linux (1024) or MacOS X (512). As a result some
 setups tested on Linux will exhibit problems on NetBSD because of
 pthread_keys usage beyond the limit. This happens for instance on
 Apache with various module loaded, and in this case no particular
 developper can be blamed for going beyond the limit, since several
 modules from different sources contribute to the problem.
 This patch makes the limit conigurable through the PTHREAD_KEYS_MAX
 environement variable. If undefined, the default remains unchanged
 (256). In any case, the value cannot be lowered below POSIX-mandated
 _POSIX_THREAD_KEYS_MAX (128).
 
 While there:
 - use EXIT_FAILURE instead of 1 when calling err(3) in libpthread.
 - Reset _POSIX_THREAD_KEYS_MAX to POSIX mandated 128, instead of 256.
 
 Fix previous: Can't use calloc/malloc before we complete initialization
 of the thread library, because malloc uses pthread_foo_specific, and it will
 end up initializing itself incorrectly.
 
 Thanks rump for not letting us use even mmap during initialization.
 
 libc/jemalloc:
 
 Fix non _REENTRANT build.
 Defer using pthread keys until we are threaded.
 From Christos, fixes PR port-arm/50087 by allowing malloc calls prior
 to libpthread initialization.
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.33 -r1.33.8.1 src/include/limits.h
 cvs rdiff -u -r1.34 -r1.34.2.1 src/lib/libc/stdlib/jemalloc.c
 cvs rdiff -u -r1.144 -r1.144.4.1 src/lib/libpthread/pthread.c
 cvs rdiff -u -r1.89 -r1.89.8.1 src/lib/libpthread/pthread_int.h
 cvs rdiff -u -r1.6 -r1.6.24.1 src/lib/libpthread/pthread_key_create.3
 cvs rdiff -u -r1.11 -r1.11.8.1 src/lib/libpthread/pthread_tsd.c
 cvs rdiff -u -r1.42 -r1.42.8.1 src/lib/libpthread_dbg/pthread_dbg.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


Home | Main Index | Thread Index | Old Index