Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/google/ruy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Jacob <benoitjacob@google.com>2022-07-12 03:53:52 +0300
committerCopybara-Service <copybara-worker@google.com>2022-07-12 03:54:32 +0300
commit0216f3e89ee60932f680c1c9434c533e55388c9f (patch)
tree765b99b25cf8e5eb40797a4e90ee163cea83abcf
parent841ea4172ba904fe3536789497f9565f2ef64129 (diff)
Skip caches that have processor_count==0.test_460342347
Some crash reports on Android tell of segfaults at address (null - 8, wrapped around) at the line below evaluating is_local, which I guess would happen if processor_count==0. PiperOrigin-RevId: 460342347
-rw-r--r--ruy/cpuinfo.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/ruy/cpuinfo.cc b/ruy/cpuinfo.cc
index a3e75d7..8a0e912 100644
--- a/ruy/cpuinfo.cc
+++ b/ruy/cpuinfo.cc
@@ -56,6 +56,9 @@ void QueryCacheParams(CpuCacheParams* cache_params) {
continue; // continue, not break, it is possible to have L1+L3 but no
// L2.
}
+ if (!cache->processor_count) {
+ continue; // crashes from Chrome on Android suggests that might happen?
+ }
const bool is_local =
cpuinfo_get_processor(cache->processor_start)->core ==
cpuinfo_get_processor(cache->processor_start +