From acdb6d3d31db988ee5d6e4b091adc58c060fa1f9 Mon Sep 17 00:00:00 2001 From: Matt Sarett Date: Fri, 13 Jan 2017 15:42:45 -0500 Subject: [PATCH] Fix ASAN NOTREECHECKS=true BUG=skia: Change-Id: I8104112ade6671b06fb5eb83b73f691fee99ea80 Reviewed-on: https://skia-review.googlesource.com/7081 Commit-Queue: Kevin Lubick Reviewed-by: Kevin Lubick --- tests/ColorSpaceXformTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ColorSpaceXformTest.cpp b/tests/ColorSpaceXformTest.cpp index a72cbbf367..bdcdd3e1a4 100644 --- a/tests/ColorSpaceXformTest.cpp +++ b/tests/ColorSpaceXformTest.cpp @@ -323,7 +323,7 @@ DEF_TEST(ColorSpaceXform_A2BCLUT, r) { } DEF_TEST(SkColorSpaceXform_LoadTail, r) { - uint64_t* srcPixel = new uint64_t[1]; + std::unique_ptr srcPixel(new uint64_t[1]); srcPixel[0] = 0; uint32_t dstPixel; sk_sp adobe = SkColorSpace::MakeNamed(SkColorSpace::kAdobeRGB_Named); @@ -332,7 +332,7 @@ DEF_TEST(SkColorSpaceXform_LoadTail, r) { // ASAN will catch us if we read past the tail. bool success = xform->apply(SkColorSpaceXform::kRGBA_8888_ColorFormat, &dstPixel, - SkColorSpaceXform::kRGBA_U16_BE_ColorFormat, srcPixel, 1, + SkColorSpaceXform::kRGBA_U16_BE_ColorFormat, srcPixel.get(), 1, kUnpremul_SkAlphaType); REPORTER_ASSERT(r, success); }