Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot recognized some armv7 Android devices #40001

Closed
yrom opened this issue Jan 7, 2020 · 1 comment
Closed

Cannot recognized some armv7 Android devices #40001

yrom opened this issue Jan 7, 2020 · 1 comment

Comments

@yrom
Copy link

yrom commented Jan 7, 2020

I'm using Flutter 1.12.13. My Flutter app crashes on some user's devices caused by Unrecognized ARM CPU architecture:

E Dart : ../../third_party/dart/runtime/vm/cpu_arm.cc: 181: error: Unrecognized ARM CPU architecture.

The Flutter 1.12.13 depends on a4911c6.
Related issue flutter/flutter#47819.

And I notice that code of cpu_arm.cc:

sdk/runtime/vm/cpu_arm.cc

Lines 174 to 176 in a4911c6

} else if (CpuInfo::FieldContains(kCpuInfoProcessor, "ARMv7") ||
CpuInfo::FieldContains(kCpuInfoModel, "ARMv7")) {
arm_version_ = ARMv7;

...has a little difference between thecpufeatures/cpu-features.c in Android NDK souces which detecting armv7 architecture from the "CPU Architecture" field:

       char* cpuArch = extract_cpuinfo_field(cpuinfo, cpuinfo_len, "CPU architecture");

        if (cpuArch != NULL) {
            char*  end;
            long   archNumber;
            int    hasARMv7 = 0;

            D("found cpuArch = '%s'\n", cpuArch);

            /* read the initial decimal number, ignore the rest */
            archNumber = strtol(cpuArch, &end, 10);

            /* Note that ARMv8 is upwards compatible with ARMv7. */
            if (end > cpuArch && archNumber >= 7) {
                hasARMv7 = 1;
            }

           //...omitted 

            if (hasARMv7) {
                g_cpuFeatures |= ANDROID_CPU_ARM_FEATURE_ARMv7;
            }

Also, I'm curious why Dart VM does not use cpu_features for detection.

This issue was closed.
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

No branches or pull requests

1 participant