git: libc - Fix bogus pthread_getspecific() return value due to bug in nmalloc

Matthew Dillon dillon at crater.dragonflybsd.org
Sun Jan 30 13:46:26 PST 2011


commit 909fda640a31a4774cfaefe59eedbf7fc1608afc
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Jan 30 13:44:11 2011 -0800

    libc - Fix bogus pthread_getspecific() return value due to bug in nmalloc
    
    * nmalloc was calling pthread_set_specific() prior to calling
      pthread_key_create(), causing it to use key 0 which might already
      have been allocated for other purposes.
    
    * Reorder initializations in _nmalloc_thr_init() to solve the problem.
    
    * This also solves certain application crashes (mail/milter-greylist).
    
    Reported-by: Francois Tigeot <ftigeot at wolfpond.org>

Summary of changes:
 lib/libc/stdlib/nmalloc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/909fda640a31a4774cfaefe59eedbf7fc1608afc


-- 
DragonFly BSD source repository





More information about the Commits mailing list