This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

is vsnprintf() async signal safe in glibc?


Hello,

I know that vsnprintf() implementation isn't in de jure POSIX list of
async safe functions, but is the implementation in glibc de facto
safe?

Quick look at the code reveals that, at the very least, it does not
seem to be do any actual locking when using _IO_strnfile.

But given the overall complexity, I am not sure I'm not missing some
other unsafe calls, such as temporary memory allocations, for
instance.

Interestingly it's possible to google up mentions of vsnprintf() being
safe on OpenBSD, SunOS, etc but nothing about generic Linux and glibc.

-- 
Andrew Aksyonoff
Sphinx Technologies Inc, http://sphinxsearch.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]