Skip to content

Add nullptr check for processor in QueryCacheParams. - #376

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_952009981
Jul 22, 2026
Merged

Add nullptr check for processor in QueryCacheParams.#376
copybara-service[bot] merged 1 commit into
masterfrom
test_952009981

Conversation

@copybara-service

Copy link
Copy Markdown

Add nullptr check for processor in QueryCacheParams.

When calling cpuinfo_get_processor(i), it can return nullptr on certain Android devices (e.g. Xiaomi, Oppo). When processor is null, accessing processor->cache causes a fatal SIGSEGV during ruy::CpuInfo::Initialize().
This change adds a null guard for processor in QueryCacheParams to ensure it is skipped, allowing safe fallback to default cache parameters if detection fails.

@google-cla

google-cla Bot commented Jul 22, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

When calling cpuinfo_get_processor(i), it can return nullptr on certain Android devices (e.g. Xiaomi, Oppo). When processor is null, accessing processor->cache causes a fatal SIGSEGV during ruy::CpuInfo::Initialize().
This change adds a null guard for processor in QueryCacheParams to ensure it is skipped, allowing safe fallback to default cache parameters if detection fails.

PiperOrigin-RevId: 952022058
@copybara-service
copybara-service Bot merged commit 857bcab into master Jul 22, 2026
@copybara-service
copybara-service Bot deleted the test_952009981 branch July 22, 2026 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants