Commit Graph

7 Commits

Author SHA1 Message Date
Mike Klein
475c5e93fe turn on alignment sanitizer
This sanitizer checks for overaligned reads and writes,
or put another way, use of underaligned pointers.

This usually happens when you cast, e.g. char* to int*
without checking that the char* is 4-byte aligned.  Each
of the changes under src/ fixes something just like that.

The unusual setup for tools/xsan.blacklist is there to
force a rebuild whenever tools/xsan.blacklist changes.
I spent a good few minutes debugging rebuilds not happening
this morning, perhaps from some strange ccache interaction.

Align SkTextBlobs as void* (today they're just 4-byte) so the
SkTextBlob::RunRecords we put after them in SkTextBlobBuilder
buffers are properly aligned (for the SkTypeface* inside).

There's no obvious error in void SkRRect::computeType(),
but one bot seems to have seen some sort of issue with

    SK_AT_SCOPE_EXIT(SkASSERT(this->isValid()));

I can't reproduce it locally, so I'm just going to unroll it.

Change-Id: I904d94f65f695e1b626b684c32216a4930b72b0c
Reviewed-on: https://skia-review.googlesource.com/146104
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-08-09 21:13:15 +00:00
Kevin Lubick
aa59d61646 Remove XSAN blacklist
Bug: skia:
Change-Id: I97bf83ca001acc762a42d26207a394faee6d90fb
Reviewed-on: https://skia-review.googlesource.com/107782
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-02-20 13:51:28 +00:00
Kevin Lubick
469ec137d7 Turn off some third party ASAN blacklists
Specifically, this breaks out all the blacklists and
unblacklists:
 - googletest
 - icu
 - imgui
 - libjpeg-turbo
 - libpng
 - libwebp
 - microhttpd
 - piex
 - sdl
 - skcms
 - zlib



Bug: oss-fuzz:6347
Change-Id: I8da10967a231c603263ac99ddbc9b75f925f5316
Reviewed-on: https://skia-review.googlesource.com/107421
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-02-15 13:58:29 +00:00
mtklein
2b3c2a3ff9 GN: add sanitize arg
Attempt to take over all *SAN builds.

MSAN has a lot of coordination required between gn/BUILD.gn and gn_flavor.py.
I'd like to follow up to move more of this into gn/BUILD.gn, to make it easier
to use locally.

The compile steps should be much faster now.  We no longer build CMake
and Clang for every run, instead using the clang_linux CIPD package.  This
removes the need for all the third_party/externals/llvm/... dependencies.

Similarly, since we're using the clang_linux package, we no longer depend
on Chrome's Clang, and thus no longer need to sync chromium on these bots.

Instead of packaging up MSAN libraries and llvm-symbolizer in the compile
output, I have the test / perf bots also depend on the clang_linux package.
These do not vary from build to build.

No more need for the xsan.blacklist -include hack: Clang, GN, and Ninja
all track changes to xsan.blacklist without our help.

This has the incidental effect of upgrading the compiler used by *SAN
bots from Clang 3.8 to Clang 3.9.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2289343002

Review-Url: https://codereview.chromium.org/2289343002
2016-09-08 08:39:34 -07:00
msarett
f44631b133 Remove size check from SkCodec
This check is useless because it is vulnerable to integer overflow.

Also, I don't think this is the right way to solve the problem
of "too large" images.  For example, many image specs allow images
larger than this, so we should too.

BUG=skia:4667
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1580113002

Review URL: https://codereview.chromium.org/1580113002
2016-01-13 10:54:20 -08:00
mtklein
7918b99506 try stifling integer overflow error
first time we've done this, let's see if it works!

BUG=skia:4667

Looks ok now.  Red ASAN bot is different errors.

Review URL: https://codereview.chromium.org/1507063007
2015-12-09 07:24:10 -08:00
mtklein
bb5b77db51 Disable sanitizers with a blacklist.
We think this might be more flexible.  It allows, e.g, function-level blacklisting,
and here an easy one-stop-shop blacklist for all of third_party/externals.

BUG=skia:

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot
NOTREECHECKS=true

Review URL: https://codereview.chromium.org/1509733003
2015-12-08 14:26:17 -08:00