Design doc: http://go/skia-android-hwasan.
This CL defines the following tasks:
- Build-Debian10-Clang-arm64-Debug-Android_HWASAN
- Test-Android-Clang-Pixel4a-CPU-Snapdragon730G-arm64-Debug-All-Android_HWASAN
- Test-Android-Clang-Pixel4a-GPU-Adreno618-arm64-Debug-All-Android_HWASAN
The HWAddress Sanitizer is only available on 64-bit Arm devices, and requires Android 10+ built with HWAddress Sanitizer support. There are prebuilt HWASan images for supported Pixel devices at https://ci.android.com (instructions at https://developer.android.com/ndk/guides/hwasan).
To support these tasks, we added two Pixel 4a devices to the tree, flashed with the corresponding prebuilt HWASan image. The specific Pixel devices were chosen based on stock availability.
See patchset 11 for an example error I introduced in //gm/3d.cpp, which was caught by the HWAddress Sanitizer.
Bug: skia:12099
Change-Id: Ic3847abc61c8a1bf686d29b97ef9d89b9bb5eb86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436572
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Leandro Lovisolo <lovisolo@google.com>
Classes of issues addressed:
1. static constexpr class variables aren't automatically inline. Already handled in a separate CL
2. Lack of C++17 copy elision means classes of objects constructed at function return need a copy or move constructor even if RVO will mean it isn't called.
3. Nested braced init no longer allowed for base classes of subclasses without constructors.
4. template static constexpr var in template class throws error about redundant initialization. Adding inline and removing defn outside of class fixes it.
5. Some places that should have been including std headers now actually need to include them.
6. No auto template parameters.
7. No lambdas in constexpr funcs.
Bug: chromium:1257145
Change-Id: Icb24c6b4ed039287fb4cf27a21a1bb7dc9821728
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457298
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This will prevent us from reusing a variable name from an outer scope
within an inner scope; this is a common source of confusion or bugs.
There are two special cases where shadowing is still allowed.
- Constructor arguments that match class member variables, e.g.:
MyCtor(int value) : value(value) {}
- Lambdas where the outside variable is not accessible in the inner
scope, e.g.:
void Fn(int x) {
auto lambda = [] { int x = 123; }; /* outer x not captured */
}
Change-Id: I073bdaf7c530fc958fc13ce68464cf345a2f5358
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439497
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
The latest emscripten uses Clang 13, which points out some new warnings
about implicit copy constructors, copy assignment operators etc.
This addresses some that I found until llvm crashed and would not
compile further (https://bugs.llvm.org/show_bug.cgi?id=50408)
Change-Id: Ia4d3f0b308facb18bf2da50261326244a7848644
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/413056
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
std::result_of is deprecated and removed in C++20, std::invoke_result is
in C++17 the library so not ready yet.
In the case of SkMakeArray there is no need for the full power of
std::invoke_result as SFINAE is not needed, nor is calling a method
supported. As a result a simple decltype is sufficient.
Bug: skia:11811
Change-Id: I6c07c380970cc2a991ab8bd457997320ba634e6c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390476
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
In the build there are some defaults which actually apply to every
use of a built-in target type, but there are some (particularaly
warnings) which apply only to targets controlled by Skia. Currently
these unwanted defaults are magically known to exist and removed
wherever they are not wanted. Instead, create 'skia_' prefixed target
templates and apply these defaults to those instead.
Change-Id: I3a2afb53c7205a2e2748d1cfad46319f2e93d3b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385516
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>