Subject: Re: syslog_r (Re: CVS commit: src/lib/libc)
To: Elad Efrat <>
From: SODA Noriyuki <>
List: tech-userlevel
Date: 10/26/2006 15:21:27
>>>>> On Thu, 26 Oct 2006 07:30:59 +0200, Elad Efrat <> said:

> the OpenBSD implementation is documented to be signal-safe, but that
> might be because functions it relies on were also made signal-safe, at
> least there.
> take a look at their signal(3):

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 as you see
in the following source:
e.g. __dtoa() modifies freelist[].

The snprintf() function is not async-signal-safe, even on OpenBSD.