Commit 4ee76daf authored by jacob.bramley's avatar jacob.bramley Committed by Commit bot

[arm] Correctly detect ARMv8 platforms with old kernels.

AArch64 kernels older than 3.18 presented a different cpuinfo format
than what V8 expects. Most of V8's logic still works, but it misreads
the "CPU architecture" field.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#35114}
parent bc272e9f
......@@ -468,7 +468,12 @@ CPU::CPU()
char* end;
architecture_ = strtol(architecture, &end, 10);
if (end == architecture) {
architecture_ = 0;
// Kernels older than 3.18 report "CPU architecture: AArch64" on ARMv8.
if (strcmp(architecture, "AArch64") == 0) {
architecture_ = 8;
} else {
architecture_ = 0;
}
}
delete[] architecture;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment