From a20641fbad57f37da6093203484ca28769e5bb64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Sun, 25 Jan 2026 12:16:56 +0100 Subject: [PATCH] fix: handle non-numeric ARM CPU architecture values Some old ARM processors (e.g., ARM926EJ-S) report CPU architecture with suffix in /proc/cpuinfo (e.g., "5TEJ" for ARMv5TEJ). This caused an "integer expression expected" error when comparing against numeric values. Extract the numeric prefix before integer comparisons. Fixes #505. --- spectre-meltdown-checker.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh index 3446e79..9357f5f 100755 --- a/spectre-meltdown-checker.sh +++ b/spectre-meltdown-checker.sh @@ -668,6 +668,8 @@ is_cpu_affected() _debug "checking cpu$i: <$cpupart> <$cpuarch>" # some kernels report AArch64 instead of 8 [ "$cpuarch" = "AArch64" ] && cpuarch=8 + # some kernels report architecture with suffix (e.g. "5TEJ" for ARMv5TEJ), extract numeric prefix + cpuarch=$(echo "$cpuarch" | grep -oE '^[0-9]+') if [ -n "$cpupart" ] && [ -n "$cpuarch" ]; then # Cortex-R7 and Cortex-R8 are real-time and only used in medical devices or such # I can't find their CPU part number, but it's probably not that useful anyway