aboutsummaryrefslogtreecommitdiff
path: root/samplecode/SampleAnimatedText.cpp
diff options
context:
space:
mode:
authormtklein <mtklein@chromium.org>2015-12-08 11:55:17 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-08 11:55:17 -0800
commitcc881dafcbd00e8a811c47c14b472acdba5dd6c6 (patch)
tree773a113973a0d838954eebfe2f7ba9bd76c5aab8 /samplecode/SampleAnimatedText.cpp
parent290f00cd752b51f517b88c40bc89016fcaf5e477 (diff)
Add sk_careful_memcpy to catch undefined behavior in memcpy.
It's undefined behavior to pass null as src or dst to memcpy, even if len is 0. This currently triggers -fsanitize=attribute-nonnull warnings, but also can lead to very unexpected code generation with GCC. sk_careful_memcpy() checks len first before calling memcpy(), which prevents that weird undefined situation. This allows me to mark all sanitizers as no-recover, i.e. make-the-bots-red fatal. CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot BUG=skia:4641 NOTREECHECKS=true Review URL: https://codereview.chromium.org/1510683002
Diffstat (limited to 'samplecode/SampleAnimatedText.cpp')
0 files changed, 0 insertions, 0 deletions