svn commit: r185728 - head/lib/libthr/thread
Peter Wemm
peter at FreeBSD.org
Sat Dec 6 18:32:50 PST 2008
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();
More information about the svn-src-head
mailing list