Matteo Concas created an issue:
https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5616
Assignee: Matteo Concas
## Summary
Enabling `RTEMS_PROFILING` when building a SPARC BSP will lead to some
undefined behavior. I have seen unaligned accesses:
```
grmon4> load
/home/matteo/dev/gsoc/rtems-net-services/build/sparc-rtems7-gr765/iperf3test01.exe;
run
0 .text 2.4MB / 2.4MB [===============>] 100%
25ce40 .tdata 20B [===============>] 100%
25ce58 .rtemsroset 3.3kB / 3.3kB [===============>] 100%
26a340 .data 93.6kB / 93.6kB [===============>] 100%
2819c0 .rtemsrwset 1.1MB / 1.1MB [===============>] 100%
Total size: 3.55MB (519.77kbit/s)
Entry point 0x00000000
Image
/home/matteo/dev/gsoc/rtems-net-services/build/sparc-rtems7-gr740/iperf3test01.exe
loaded
*** BEGIN OF TEST libBSD IPERF3 1 ***
*** TEST VERSION: 7.0.0
*** TEST STATE: EXPECTED_PASS
*** TEST BUILD: RTEMS_POSIX_API RTEMS_PROFILING
*** TEST TOOLS: 16.1.0 20260430 (RTEMS 7, RSB
348a70cf182d9e3452504757f53a78719190dc0b, Newlib a0ccec7e)
nexus0: <RTEMS Nexus device>
grethtwo0: <Ethernet Gbit MAC> on nexus0
info: grethtwo0: Ethernet address: 0e:b0:ba:5e:ba:11
info: lo0: link state changed to UP
greth: driver attached
**** PHY ****
Vendor: 885 Device: 22 Revision: 2
Current Operating Mode: 1000 Mbit Full Duplex
Autonegotiation Time: 7528ms
Connecting to host 172.16.103.1, port 5201
[ 28] local 172.16.103.2 port 13962 connected to 172.16.103.1 port 5201
Error mode (tt = 0x07, mem address not aligned)
Hint: Before trap (tt = 0x89, trap instruction)
0x001e1a48: 81c44000 jmp %l1
```
or privileged instruction errors:
```
[...]
[ 28] local 172.16.103.2 port 36999 connected to 172.16.103.1 port 5201
Error mode (tt = 0x03, privileged instruction)
Hint: Before trap (tt = 0x89, trap instruction)
0x001e19d8: a9500000 mov %wim, %l4
```
The common element here is that the local registers are not restored properly
or overwritten somehow.
I will try to run the RTEMS testsuite with profiling enabled to see if any test
becomes a fail with it.
<!-- Pre-set options
- milestone
-->
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5616
You're receiving this email because of your account on gitlab.rtems.org.
_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs