Subject: Re: syslog_r (Re: CVS commit: src/lib/libc)
To: None <tech-userlevel@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-userlevel
Date: 10/26/2006 03:52:41
> The OpenBSD documentation is wrong.
> For example, the snprintf() function indirectly calls __dtoa() via
> following path:
> snprintf() -> vfprintf() -> cvt() -> __dtoa()
> And the __dtoa() implemenation modifies lots of static data [...]
Perhaps snprintf *can* end up calling __dtoa. But does it actually do
so when called the way syslog_r calls it? (This is an honest question;
I don't know the answer, but it seems at least plausible that syslog_r
may take care to call snprintf only in ways that end up being
signal-safe.)
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B