summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/malloc.c
diff options
context:
space:
mode:
authormatthew <matthew@openbsd.org>2012-06-26 14:53:23 +0000
committermatthew <matthew@openbsd.org>2012-06-26 14:53:23 +0000
commit4ddf57cc6fd51b9a16ccfae3ce1d6ea529405a31 (patch)
treec97f0cf2a3852a3f1a980238ea563fef9bfcabf6 /lib/libc/stdlib/malloc.c
parentAdd some more paranoia and make code clearer. Check that the required (diff)
downloadwireguard-openbsd-4ddf57cc6fd51b9a16ccfae3ce1d6ea529405a31.tar.xz
wireguard-openbsd-4ddf57cc6fd51b9a16ccfae3ce1d6ea529405a31.zip
Use nl_langinfo(RADIXCHAR) instead of localeconv()->decimal_point in
printf() and avoid calling it unless needed (i.e., when we have a floating point value to print). This isn't a big concern currently due to our limited locale support and current localeconv() implementation, but it's still technically a data race and implementing POSIX 2008 per-thread locales is likely to make it worse. nl_langinfo() isn't guaranteed by POSIX to be thread-safe either, but at least our current implementation is thread-safe and it's a simpler interface to keep that way. Printing floating point values isn't async-signal-safe anyway due to gdtoa()'s use of malloc(), so that's not an issue. ok deraadt, stsp, millert
Diffstat (limited to 'lib/libc/stdlib/malloc.c')
0 files changed, 0 insertions, 0 deletions