diff options
author | 2017-01-10 15:22:36 -0500 | |
---|---|---|
committer | 2017-01-10 20:57:48 +0000 | |
commit | 3444cadedd47f264337b6a635bbcd6764e20e7d1 (patch) | |
tree | 1393fef176cf9ff8b153478ad34f380c5ea9ac4c /src | |
parent | 986563bcff26300ea4317b4dd84917d5240bb723 (diff) |
Invalidate icache in copy_to_executable_mem()
This should be a no-op on x86 (unified icache and dcache), but is required on
ARM because the icache and dcache are separate.
The Pixel C bots are crashing at head, and so is my local Pixel C, but not
after this CL. Interestingly, my Pixel not-C (phone) has always been fine.
I wonder if it has a unifed cache?
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Release-Android
Change-Id: I8f9d53729613c51aabfeb49495aac38ce2801a84
Reviewed-on: https://skia-review.googlesource.com/6847
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/splicer/SkSplicer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/splicer/SkSplicer.cpp b/src/splicer/SkSplicer.cpp index f1a8c8930c..e68adabd3f 100644 --- a/src/splicer/SkSplicer.cpp +++ b/src/splicer/SkSplicer.cpp @@ -113,7 +113,9 @@ namespace { if (src && len) { // TODO: w^x auto fn = mmap(nullptr, len, PROT_WRITE|PROT_EXEC, MAP_ANON|MAP_PRIVATE, -1, 0); - return memcpy(fn, src, len); + memcpy(fn, src, len); + __builtin___clear_cache((char*)fn, (char*)fn + len); + return fn; } return nullptr; } |