DescriptionSecond attempt at introducing SafeSPrintf().
See original discussion at https://codereview.chromium.org/18656004/
Reverted as: https://codereview.chromium.org/23463010/
Added a new base::strings::SafeSPrintf() function that can
safely be called from all restricted (e.g. async-signal-safe)
environments. It is roughly equivalent to snprintf(). But
it is easier to use, as it uses C++ to be type-safe.
In release builds, this function is guaranteed to never call
any other library function nor any system calls. In debug
builds, we call RAW_CHECK() in some circumstances.
This code is needed for (at least) the seccomp sandbox and
to clean up code in the stack tracer. Those changes are
pending and will be submitted as separate CLs.
BUG=285499
TEST=base_unittests
TBR=willchan@chromium.org
NOTRY=true
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=221322
Patch Set 1 #Patch Set 2 : Add some debugging output #Patch Set 3 : Collecting more data #Patch Set 4 : cros_daisy doesn't define __unix__. Try to get the definition for OS_POSIX and then test for that s… #Patch Set 5 : Relax tests for NULL #Patch Set 6 : Added missing braces (style-change only) #
Messages
Total messages: 8 (0 generated)
|