spin off remaining integer overflow fixes
authormtklein <mtklein@chromium.org>
Tue, 8 Dec 2015 18:53:01 +0000 (10:53 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 8 Dec 2015 18:53:01 +0000 (10:53 -0800)
  - Carmack rsqrt uses an int where it wants a uint32_t.
  - turn off all santizers (including signed-integer-overflow) in third_party/externals/sftntly.

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

BUG=skia:4635

Review URL: https://codereview.chromium.org/1511643002

bench/MathBench.cpp
gyp/sfntly.gyp

index a5cc033c6fc63f72c9d4f707da1a69533190413f..fb35a8aafec786df3967e2af4f1343afb8a7c722 100644 (file)
@@ -126,7 +126,7 @@ private:
 
 static inline float SkFastInvSqrt(float x) {
     float xhalf = 0.5f*x;
-    int i = *SkTCast<int*>(&x);
+    uint32_t i = *SkTCast<uint32_t*>(&x);
     i = 0x5f3759df - (i>>1);
     x = *SkTCast<float*>(&i);
     x = x*(1.5f-xhalf*x*x);
index 4e3ca5f47a33abefcf3a5d78005dcca87070b845..07e2d2cb95c9e0362f1e9eb753cce1c266e95b13 100644 (file)
@@ -33,6 +33,9 @@
       'dependencies' : [
         'icu.gyp:icuuc',
       ],
+      # Disable any sanitizers we might be using.
+      'ldflags!': [ '-fsanitize=<(skia_sanitizer)' ],
+      'cflags!':  [ '-fsanitize=<(skia_sanitizer)' ],
       'conditions': [
         [ 'skia_os == "win"',
           {