Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Dec 2008 02:32:49 +0000 (UTC)
From:      Peter Wemm <peter@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r185728 - head/lib/libthr/thread
Message-ID:  <200812070232.mB72WnrR011584@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: peter
Date: Sun Dec  7 02:32:49 2008
New Revision: 185728
URL: http://svn.freebsd.org/changeset/base/185728

Log:
  When libthr and rtld start up, there are a number of magic spells cast
  in order to get the symbol binding state "just so".  This is to allow
  locking to be activated and not run into recursion problems later.
  
  However, one of the magic bits involves an explicit call to _umtx_op()
  to force symbol resolution.  It does a wakeup operation on a fake,
  uninitialized (ie: random contents) umtx.  Since libthr isn't active, this
  is harmless.  Nothing can match the random wakeup.
  
  However, valgrind finds this and is not amused.  Normally I'd just
  write a suppression record for it, but the idea of passing random
  args to syscalls (on purpose) just doesn't feel right.

Modified:
  head/lib/libthr/thread/thr_rtld.c

Modified: head/lib/libthr/thread/thr_rtld.c
==============================================================================
--- head/lib/libthr/thread/thr_rtld.c	Sun Dec  7 00:42:15 2008	(r185727)
+++ head/lib/libthr/thread/thr_rtld.c	Sun Dec  7 02:32:49 2008	(r185728)
@@ -180,7 +180,7 @@ _thr_rtld_init(void)
 {
 	struct RtldLockInfo	li;
 	struct pthread		*curthread;
-	long dummy;
+	long dummy = -1;
 
 	curthread = _get_curthread();
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812070232.mB72WnrR011584>