Fix issue unveiled on NetBSD: Add PAL__vsnprintf shadow in PAL
authorKamil Rytarowski <n54@gmx.com>
Thu, 18 Feb 2016 22:41:56 +0000 (23:41 +0100)
committerKamil Rytarowski <n54@gmx.com>
Wed, 13 Apr 2016 06:56:05 +0000 (08:56 +0200)
commit38239d7cba06ceab11757f29585949e422bb93ed
tree99420cdc73d6dd32f72eb43835b5506a6d81d24b
parentde13e04e5a040cfd7c34eefb99bf9daa37f99b9d
Fix issue unveiled on NetBSD: Add PAL__vsnprintf shadow in PAL

NetBSD's libc internally uses a function named _vsnprintf. We need to mask
PAL's version of this function to remove clash with the system. With it
snprintf(3) calls were jumping out of libc and landing back to PAL.

It was unveiled with many PAL tests.

Detailed documentation about _symbols in the NetBSD libc is documented
in the NetBSD sources in a file: src/lib/libc/README

Retire unneeded _vsnprintf().

Thanks Jan Vorli (Microsoft) for help with debugging.
Thanks Jan Kotas (Microsoft) for suggesting the right solution.

Fix dotnet/coreclr#3199

Commit migrated from https://github.com/dotnet/coreclr/commit/fd1f866f28c71570a7ef80dd1159a5cd755f8bf3
src/coreclr/src/ToolBox/SOS/Strike/strike.h
src/coreclr/src/pal/inc/pal.h
src/coreclr/src/pal/src/cruntime/printf.cpp
src/coreclr/src/pal/src/cruntime/printfcpp.cpp
src/coreclr/src/pal/src/cruntime/silent_printf.cpp