NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: lib/47055: libc diagassert issues
The following reply was made to PR lib/47055; it has been noted by GNATS.
From: matthew green <mrg%eterna.com.au@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: lib-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost
Subject: re: lib/47055: libc diagassert issues
Date: Thu, 11 Oct 2012 16:53:50 +1100
> (1) it calls syslog() blindly, so if an assertion happens in a program
> that hasn't called openlog(), it ends up using uninitialized state in
> syslog.c. The observable effect of this seems to be to issue syslog
> messages with no hostname field; however, it could be (or become,
> without much notice) a good deal worse.
that shouldn't be a problem. it sounds like a bug in syslog(3) itself.
i've never seen any requirement for openlog(3) being necessary and indeed
our documentation says:
The openlog() function provides for more specialized processing of the
messages sent by syslog() and vsyslog().
> (2) it isn't thread-safe. It frob a global variable (diagassert_flags)
> without locking. It also should probably be using syslog_r() rather
> than syslog().
probably. (i don't think we had syslog_r() back when diagassert
first appeared...)
.mrg.
Home |
Main Index |
Thread Index |
Old Index