From d9cca4a11a30f1391b56dd53ca2c6615298e2b14 Mon Sep 17 00:00:00 2001 From: benjaminwagner Date: Wed, 4 May 2016 11:06:19 -0700 Subject: Fix ASAN errors. These errors occur when building for GPU but running dm with --nogpu. The current ASAN bots do not catch these because 1) the CPU bot compiles with skia_gpu=0 and 2) the GPU bot runs with --nocpu; whereas the new ASAN bots use the same compile for both the CPU and GPU bots. BUG=skia:5157 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1953473002 Review-Url: https://codereview.chromium.org/1953473002 --- src/gpu/GrShape.cpp | 4 ++-- src/gpu/GrStyle.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gpu') diff --git a/src/gpu/GrShape.cpp b/src/gpu/GrShape.cpp index bb9c186fe3..3b49f6ae7f 100644 --- a/src/gpu/GrShape.cpp +++ b/src/gpu/GrShape.cpp @@ -32,8 +32,8 @@ GrShape& GrShape::operator=(const GrShape& that) { break; } fInheritedKey.reset(that.fInheritedKey.count()); - memcpy(fInheritedKey.get(), that.fInheritedKey.get(), - sizeof(uint32_t) * fInheritedKey.count()); + sk_careful_memcpy(fInheritedKey.get(), that.fInheritedKey.get(), + sizeof(uint32_t) * fInheritedKey.count()); return *this; } diff --git a/src/gpu/GrStyle.h b/src/gpu/GrStyle.h index 3ed4448441..d63df32290 100644 --- a/src/gpu/GrStyle.h +++ b/src/gpu/GrStyle.h @@ -159,8 +159,8 @@ private: fType = that.fType; fPhase = that.fPhase; fIntervals.reset(that.fIntervals.count()); - memcpy(fIntervals.get(), that.fIntervals.get(), - sizeof(SkScalar) * that.fIntervals.count()); + sk_careful_memcpy(fIntervals.get(), that.fIntervals.get(), + sizeof(SkScalar) * that.fIntervals.count()); return *this; } void reset() { -- cgit v1.2.3