Skip to content

Python 3.13 can't compile with armv5 target #125444

Closed
@rossburton

Description

@rossburton

Bug report

Bug description:

If we build cpython 3.13 for Linux/ARMv5 using -march=armv5te and then run inside a qemu with the versatilepb machine (which uses a ARM926EJ-S processor) then python crashes with "Illegal Instruction". Specifically, mrc is used in a few places to get the thread ID, but this not possible in cores lower than ARMv6K.

Users of mrc:

I suspect the best way of implemented the required check would be:

#if defined(__arm__) && __ARM_ARCH >= 6 && !defined(__ARM_ARCH_6__)

That is, if Arm and if the architecture level is 6 or great and if this is not bare v6 (so v6K/v6Z are included).

Or a blunter but simpler hammer on the grounds that v5/v6 is pretty niche these days could be:

#if defined(__arm__) && __ARM_ARCH >= 7

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

Labels

3.13bugs and security fixesbuildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions