Am 18.08.24 um 14:55 schrieb Stephen Kitt:
Hi Bernhard,

On Sat, 17 Aug 2024 17:49:20 +0200, Bernhard Übelacker
<bernha...@mailbox.org> wrote:
I tried to run rr within a Debian arm64 trixie/unstable,
running at a Raspberry Pi 3 with a ARM Cortex-A53.

I know this CPU does not support rr,
but crashing may still not be desired.

Following is an example gdb session where the crash happens
in the static initialization by using a "retaa" instruction,
which seems to belong to pointer authentication, but I am
not sure if this CPU is supposed to support it.

If pointer authentication is not part of the arm64 baseline,
maybe the package isa-support should provide a package
which rr can depend on, like it does to sse2-support at i386?

rr isn’t supposed to crash on unsupported CPUs; on my Allwinner A64
Cortex-A53 system it exits with

[FATAL ./src/PerfCounters_aarch64.h:83:compute_cpu_microarch()] Unknown
aarch64 CPU type implementer: 0x41, variant: 0x0 part: 0xd03


Presumably on your system, retaa is encountered before this check. My A53
system supports more features than yours (lscpu reports aes, pmull, sha1, and
sha2 in addition to the flags in your lscpu output), perhaps it supports
retaa — I don’t know enough about ARMv8 (v8.3-A in fact) to determine that.
The build specifies -march=armv8.3-a so it is definitely possible for
unsupported instructions to be encountered before CPU identification has
finished...

I take it "rr true" fails similarly, outside of gdb?

Regards,

Stephen


Hello Stephen,
yes, outside of gdb it crashes too [1].

I also forgot to note the rr build in bookworm (5.6.0-3+b1)
does not show this issue and shows the expected message about
the unknown/unsupported CPU.

Kind regards,
Bernhard

[1]
    root@rpi3-20240331:~# rr true
    Ungültiger Maschinenbefehl (Speicherabzug geschrieben)
    root@rpi3-20240331:~#

[2]
    root@chroot-12-bookworm-stable-arm64:~# rr --version
    rr version 5.6.0
    root@chroot-12-bookworm-stable-arm64:~# rr true
    [FATAL ./src/PerfCounters_aarch64.h:83:compute_cpu_microarch()] Unknown 
aarch64 CPU type implementer: 0x41, variant: 0x0 part: 0xd03
    root@chroot-12-bookworm-stable-arm64:~#

Reply via email to