Skip to content

All tests failing for v3.5.0 on aarch64 #1382

Closed

Description

Hi, I'm getting test failures when trying to package 3.5.0 for Arch Linux, but only when building on an aarch64 host. All tests pass on an x86_64 host. This is not an issue with 3.4.5.

Test failure output is as follows:

Test project /build/mimalloc/src/build
    Start 1: test-api
1/6 Test #1: test-api .........................***Exception: Illegal  0.08 sec

    Start 2: test-api-fill
2/6 Test #2: test-api-fill ....................***Exception: Illegal  0.08 sec

    Start 3: test-stress-heaps
3/6 Test #3: test-stress-heaps ................***Failed    0.09 sec
Illegal instruction

    Start 4: test-stress-subprocs
4/6 Test #4: test-stress-subprocs .............***Exception: Illegal  0.07 sec

    Start 5: test-stress
5/6 Test #5: test-stress ......................***Exception: Illegal  0.07 sec

    Start 6: test-stress-dynamic
6/6 Test #6: test-stress-dynamic ..............***Failed    0.09 sec
Illegal instruction


0% tests passed, 6 tests failed out of 6

Total Test time (real) =   0.48 sec

The following tests FAILED:
	  1 - test-api (ILLEGAL)
	  2 - test-api-fill (ILLEGAL)
	  3 - test-stress-heaps (Failed)
	  4 - test-stress-subprocs (ILLEGAL)
	  5 - test-stress (ILLEGAL)
	  6 - test-stress-dynamic (Failed)
Errors while running CTest

Please let me know if there is any other information I can provide. Thank you!

Activity

  1. daanx commented on Aug 29, 2026

    @daanx
    Collaborator

    Ah, can you try with cmake -DMI_OPT_ARCH=OFF ? I recently changed from armv8.1 to armv8.3 since the latter has a load-acquire instruction which speeds things up. Maybe you run on an arm processor that doesn't support that?

  2. bschnei commented on Aug 29, 2026

    @bschnei
    Author

    That didn't work but setting -D MI_NO_OPT_ARCH=ON did which I figured out from this comment. I am building on a cloud host (neoverse-n1) which I believe is v8.2, but I am targeting aarch64 in general which means v8. Arch generally does this by setting march=armv8-a in CFLAGS. Is there a recommended approach for that case?

  3. daanx commented on Aug 30, 2026

    @daanx
    Collaborator

    Ah, I will fix the MI_OPT_ARCH issue so MI_NO_OPT_ARCH is not needed. Mimalloc used to use just armv8.1-a for MI_OPT_ARCH but recently I changed it to armv8.3-a (which has the LDAPR instruction). I think I will revert this again (or perhaps only use as default on Apple) as maybe there are just too many armv8.1-a processors out there. Less than armv8.1-a is not great though as those lack fast atomic operations. tbc.

  4. bschnei commented on Sep 1, 2026

    @bschnei
    Author

    Thank you for considering this case! Arch doesn't have any packages that explicitly depend on this project, but it is very well maintained for x86_64. A few of us have been working on a Port of Arch packages to aarch64, though it's an open question right now whether we will target v8 or v8.2 (or both) long-term. It is safe to assume the build hosts themselves will be v8.2 (or later) hosts, but the target march we may compile to could be as low as v8.

    Basically if you support v8 then you are Raspberry Pi 4 and later era. The Pi 5 is v8.2. You point out the obvious downside: those early v8 devices lack CPU instructions that often introduce a performance penalty to workaround.

  5. daanx commented on Sep 1, 2026

    @daanx
    Collaborator

    Thanks :-) In the latest v3.5.1 the default -DMI_OPT_ARCH is set to armv8.1 for a Linux build (and armv8.3 only for Apple builds). The armv8.1-a is much better for mimalloc as it contains native atomic operations that mimalloc uses a lot. The armv8.3 further adds an efficient load-acquire which also benefits mimalloc (but to a lesser extent).

    You may consider having a normal build for arm8.1-a and another for older devices with MI_OPT_ARCH=OFF.

  6. bschnei commented on Sep 2, 2026

    @bschnei
    Author

    3.5.1 builds and all tests pass just fine with march=armv8-a. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions