Illegal instruction (core dumped) on RISC-V
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
llvm-defaults (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
$ clang --version
PLEASE submit a bug report to https:/
Stack dump:
0. Program arguments: clang --version
1. Compilation construction
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZE
/lib/riscv64-
Illegal instruction (core dumped)
ii clang-14 1:14.0.0-1ubuntu1 riscv64 C, C++ and Objective-C compiler
ii libllvm14:riscv64 1:14.0.0-1ubuntu1 riscv64 Modular compiler and toolchain technologies, runtime library
$ uname -a
Linux linux-riscv64 5.17.0-
Steps to reproduce:
1. Install Ubuntu 22.04.1 RISC-V from https:/
2. Install all updates.
3. apt-get install clang
4. Run clang.
Let me know in case you need additional diagnostics. SSH access can be provided on request to project developers.
tags: | added: foundation-todo |
tags: |
added: foundations-todo removed: foundation-todo |
tags: | removed: foundations-todo |
Thanks for all the steps, the issue is easily reproducible.
The illegal instruction trap is caused by a 'fence.tso' instruction that the C906 core in the D1 SoC fails to decode: it is known issue and fixed in opensbi 1.1 by emulating a fence instead.
I filled an SRU here https:/ /bugs.launchpad .net/ubuntu/ +source/ llvm-defaults/ +bug/1995080 and I'm testing the fix in my ppa:alexghiti/ riscv.
Thanks again for the report,
Alex