MT-safe annotations for gcvt and related functions

Florian Weimer fweimer@redhat.com
Fri Dec 12 11:00:00 GMT 2014


gcvt is declared in the manual as:

@deftypefun {char *} gcvt (double @var{value}, int @var{ndigit}, char 
*@var{buf})
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}

I think that's incorrect because it's implemented in terms of 
(locale-dependent, not async-safe etc.) sprintf.  The preprocessor logic 
in is a bit difficult to follow, but some of the gcvt-related functions 
even call malloc directly.

-- 
Florian Weimer / Red Hat Product Security



More information about the Libc-alpha mailing list