Documentation | Rust Documentation: Hello World on SPARC crashes since 2024-Oct-10 (#37)

Frank Kuehndel (@frank_k) gitlab at rtems.org
Fri Oct 11 13:07:51 UTC 2024



Frank Kuehndel created an issue: https://gitlab.rtems.org/rtems/docs/rtems-docs/-/issues/37



## Summary

Executing the exact instructions from the [rtems user manual](https://docs.rtems.org/branches/master/user/rust/bare-metal.html#bare-metal-rust-with-rtems) results in a `hello_rtems_sparc.exe` executable which crashes when executed. Currently, the output looks like:

```
+ rtems-run --rtems-bsp=leon3-sis hello_rtems_sparc.exe
RTEMS Testing - Run, 6.0.not_released
 Command Line: /opt/rtems/6/bin/rtems-run --rtems-bsp=leon3-sis hello_rtems_sparc.exe
 Host: Linux 134940171c14 5.14.21-150500.55.68-default #1 SMP PREEMPT_DYNAMIC Wed Jun 5 21:39:05 UTC 2024 (40e256a) x86_64
 Python: 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0]
Host: Linux-5.14.21-150500.55.68-default-x86_64-with-glibc2.39 (Linux 134940171c14 5.14.21-150500.55.68-default #1 SMP PREEMPT_DYNAMIC Wed Jun 5 21:39:05 UTC 2024 (40e256a) x86_64 x86_64)

 SIS - SPARC/RISCV instruction simulator 2.30,  copyright Jiri Gaisler 2020
 Bug-reports to jiri at gaisler.se

 LEON3 emulation enabled, 4 cpus online, delta 50 clocks

 Loaded hello_rtems_sparc.exe, entry 0x40000000

*** FATAL ***
fatal source: 9 (RTEMS_FATAL_SOURCE_EXCEPTION)
CPU: 0

unexpected trap 133
PSR = 0xf3401fc0
PC = 0x4000adc8
nPC = 0x4000adcc
WIM = 0x00000040
Y = 0x00000000
g0 = 0x00000000
g1 = 0x4000b32c
g2 = 0x00010009
g3 = 0x0001004b
g4 = 0x00000000
g5 = 0x00000000
g6 = 0x40026600
g7 = 0x00000000
[more register dumps]
```

The first known buggy build was:

| | Version/Commmit |
| ------ | ------ |
|Date: |2024-10-10T09:56:41+02:00 |
|rtems-docs: |7817d7a306cb4627b1208be84c33c4d9b1b2201f |
|rtems-source-builder: |989ec6342f410f21e6585e4828a4c5f4f8da5e83 |
|rtems: |bd9f5c1eb07ec245576abb93d3bc54618be1fb94 |
|cargo: |1.81.0 (2dbb1af80 2024-08-20) |
|rustc: |1.83.0-nightly (eb4e23467 2024-10-09) |

The last known good build was:

| | Version/Commmit |
| ------ | ------ |
|Date: |2024-10-09T02:33:07+02:00 |
|rtems-docs: |7817d7a306cb4627b1208be84c33c4d9b1b2201f|
|rtems-source-builder: |8c8156d2133a08d5b93de33828ae1e7009f49974 |
|rtems: |bd9f5c1eb07ec245576abb93d3bc54618be1fb94 |
|cargo: |1.81.0 (2dbb1af80 2024-08-20) |
|rustc: |1.83.0-nightly (3ae715c8c 2024-10-07) |

I had the CI re-run with the *rtems, rtems-source-builder, rtems-docs* git commits from the last good build – resulting in the same crash. Hence, I assume this is a new bug Rust *nigthly*.

By the way, the build of hello world for Risc V (which is also part of the RTEMS user manual instructions) is not affected and works fine. It uses the *standard* `rustc` and not the *nightly* one.

The last bug of this type #32 was just closed by the Rust community on Sunday (with a lot of labor) and this new issue pops up on Thursday ...

## Steps to reproduce

Follow the instructions in [Bare Metal Rust with RTEMS](https://docs.rtems.org/branches/master/user/rust/bare-metal.html#bare-metal-rust-with-rtems)

### Pre-set options

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/docs/rtems-docs/-/issues/37
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20241011/8aa8150f/attachment-0001.htm>


More information about the bugs mailing list