Skip to content

Chez 10.3 fails on ARM32 (armv7) during Idris2 bootstrap: Exception in + (#f is not a number) inside binary-imm-op #995

@ncopa

Description

@ncopa

Chez Scheme 10.3.0 fails when compiling Idris2 on 32-bit ARM (armv7, Alpine Linux,
musl). The same Idris2 sources build successfully with Chez Scheme 10.2.0 on armv7,
and with Chez 10.3.0 on x86 and x86_64.

The failure happens during compile-program of idris2-boot.ss:

Exception in +: #f is not a number

Entering the Chez debugger and inspecting the continuation shows that
binary-imm-op receives #f as its last argument.

Continuation snapshot:

# : show
0: (reg . %r3)
1: (reg . %sfp)
2: 25032
3: ((long . 3985869568))
4: (137)
5: addi
6: #f ;; <-- unexpected

This leads to:
Exception in +: #f is not a number

This appears to be a code generator issue for ARM32 in 10.3: the same
operation works on x86/x86_64, and the same Idris2 bootstrap works on
armv7 with Chez 10.2.0.

Reproduction (on armv7):

chez --debug-on-exception --program idris2_app/idris2-boot.ss

Environment:
Alpine Linux edge
arch: armv7 (ARMv7-A, hardfloat)
libc: musl
Chez Scheme: 10.3.0 (Alpine package)

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