-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix C++ exception handling on NIOS2 #35790
Conversation
The NIOS2 architecture linker script was including `cplusplus-ram.ld` linker script after `__data_ram_end`, and this caused the content of `.gcc_except_table` section to be not copied to the RAM by the `z_data_copy` function; leading to the C++ exception handling malfunction. This commit relocates the `cplusplus-ram.ld` linker script inclusion such that the contents of the relevant sections are properly copied by the `z_data_copy` function. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The C++ exception handling feature is now supported on all architectures. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The C++ exception handling feature is now supported on all architectures. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
@@ -9,7 +9,6 @@ tests: | |||
min_flash: 54 | |||
tags: cpp | |||
cpp.libcxx.exceptions: | |||
arch_exclude: nios2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we probably need to platform_exclude: qemu_nios2 here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the time being, twister
automatically skips any tests with FLASH overflow
and treats it as a non-failure. Also, If we ever manage to slim down Zephyr such that it can fit into the current 128KB flash, it will pass anyway.
stephanos@devworx1:~/Dev/zephyrproject/zephyr$ scripts/twister -v -N -s tests/subsys/cpp/libcxx/cpp.libcxx.exceptions -p qemu_nios2
ZEPHYR_BASE unset, using "/home/stephanos/Dev/zephyrproject/zephyr"
Renaming output directory to /home/stephanos/Dev/zephyrproject/zephyr/twister-out.14
INFO - Zephyr version: v2.6.0-rc2-57-g053ff6fa0e72
INFO - JOBS: 60
INFO - Using 'zephyr' toolchain.
INFO - Building initial testcase list...
INFO - 1 test scenarios (1 configurations) selected, 0 configurations discarded due to filters.
INFO - Adding tasks to the queue...
INFO - Added initial list of jobs to queue
INFO - 1/1 qemu_nios2 tests/subsys/cpp/libcxx/cpp.libcxx.exceptions SKIPPED (FLASH overflow)
INFO - 0 of 0 test configurations passed (0.00%), 0 failed, 1 skipped with 0 warnings in 11.06 seconds
INFO - In total 0 test cases were executed, 4 skipped on 1 out of total 372 platforms (0.27%)
INFO - 0 test configurations executed on platforms, 0 test configurations were only built.
INFO - Saving reports...
INFO - Writing xunit report /home/stephanos/Dev/zephyrproject/zephyr/twister-out/twister.xml...
INFO - Writing xunit report /home/stephanos/Dev/zephyrproject/zephyr/twister-out/twister_report.xml...
INFO - Run completed
In that sense, I doubt it is necessary to platform_exclude: qemu_nios2
here.
@nashif any comments on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, if that's the case than no issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably need to exclude qemu_nios2 from the test. Can you add a comment that qemu6 as expected in SDK 0.13.0 should fix that.
Summary
Test Result
Note that, in order to test this in
qemu_nios2
, you must do so with a patched QEMU: see #35772 (comment).Fixes #35772.