Alignment traps on armv5tejl devices
I've cross-compiled lnav 0.8.1 for use on armv5 devices. The program builds and runs successfully, but performance is poor due to a number of alignment traps:
$ grep lnav /var/log/syslog-*
[ 1990.399258] Alignment trap: lnav (2591) PC=0x000cdcc8 Instr=0xe795100c Address=0x0018ffea FSR 0x013
[ 1990.413296] Alignment trap: lnav (2591) PC=0x000cf794 Instr=0xe79a0006 Address=0x001900e3 FSR 0x001
...
[ 389.258995] Alignment trap: lnav (2331) PC=0x000cf794 Instr=0xe79a0006 Address=0x001a1b29 FSR 0x001
[ 389.288618] Alignment trap: lnav (2331) PC=0x000cf794 Instr=0xe79a0006 Address=0x001a5c3a FSR 0x001
I've tracked the PC addresses to the locations below:
- line 500 of
ptimec.hhat tagv0.8.1 ptime_f16()andptime_f17()fromtime_fmts.cc
Here is the patch file that was used to enable cross-compilation. More info including test results will be added soon.
Thanks
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
I get a similar error with lnav 0.10.1 on armv7:
<4>1 2021-11-26T12:02:16.025598+00:00 zs2002003 kernel - - - Alignment trap: lnav (381) PC=0x0016cf84 Instr=0xe9d86716 Address=0xb580599b FSR 0x011
<4>1 2021-11-26T12:02:16.025665+00:00 zs2002003 kernel - - - Alignment trap: lnav (381) PC=0x0016cf84 Instr=0xe9d86716 Address=0xb58059fb FSR 0x011
Closing old issues... reopen if it's reproduceable on new builds.
I just updated lnav and I still get these errors:
Alignment trap: lnav (947) PC=0x002f1234 Instr=0xe9d86716 Address=0x00a7584b FSR 0x011
Alignment trap: lnav (947) PC=0x002f1234 Instr=0xe9d86716 Address=0x00a758ab FSR 0x011
Alignment trap: lnav (947) PC=0x002f1234 Instr=0xe9d86716 Address=0x00a7590b FSR 0x011
...
System info:
root@bb2211039:~# lnav --version
lnav 0.12.2
root@bb2211039:~# uname -a
Linux bb2211039 6.1.0-xilinx #1 SMP PREEMPT Thu May 2 12:24:46 UTC 2024 armv7l GNU/Linux
No patches applied to lnav itself. Extra build options:
--disable-system-paths --with-ncursesw