[BUG] Issue and regression with libcxx #13497
Labels
Arch: risc-v
Issues related to the RISC-V (32-bit or 64-bit) architecture
Area: OS Components
OS Components issues
OS: Linux
Issues related to Linux (building system, etc)
Type: Bug
Something isn't working
Description / Steps to reproduce the issue
I've identified a couple of issues when using LLVM libcxx and userspace applications. This is reproducible on
rv-virt:knsh
with the addition of:The first issue is that the static constructor isn't called. For example, when running the
helloxx
application:However, if I change the cxx standard version to
CONFIG_CXX_STANDARD="c++2b"
, the static construct is called:The second issue seems to be a regression with #13110, in which exceptions are always enabled for libcxx, after this change, running any c++ application results in an IPC:
This is only an issue when static constructors are called, (so enabling c++2b in this example). Reverting #13110 seems to fix this behaviour.
Running addr2line on the faulting instruction yields to results. My assumption is that there is an additional static constructor called for exception support, and this is what is causing the issue. However, I don't know enough about these layers to be sure.
Enabling
CONFIG_CXX_EXCEPTION
doesn't resolve the issue.Possibly a reasonable solution to the second issue would be to revert the change which removed the
CONFIG_CXX_EXCEPTION
change from the libcxx build and let targets which need the library build with exception support add this option in the defconfigs?On which OS does this issue occur?
[Linux]
What is the version of your OS?
Ubuntu 22.04 (Docker)
NuttX Version
NuttX 12.6.0-RC1 f5b50be05e Sep 17 2024 05:07:45 risc-v rv-virt
Issue Architecture
[risc-v]
Issue Area
[OS Components]
Verification
The text was updated successfully, but these errors were encountered: