-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[BUG] Regression: cxxtest crash #14002
Comments
does libcxx generate the similar panic? |
I'll try this. In the mid time, I tried the same configuration on 12.6.0 and same result so I wonder if it even work one day. |
OK this is better but it still crash:
Note: I had to increase drastically the default stack value to have something working, so maybe it is also the problem for the C++ toolchain version. I'll give it a try |
OK! I have something working! When using the C++ toolchain, one have to initialize std::cout or you will crash the application. std::ofstream ttyOut;
ttyOut.open ("/dev/console");
std::cout.rdbuf(ttyOut.rdbuf()); One probably need to to it also to std::cerr and std::clog. I can do a patch to initialize properly this part of the C++ library in NuttX bootup but I don't knwo where I can put it. Any clue? In summary:
|
do you have the similar snippet in your ld script:
|
I didn't have this snippet but this one:
I tried yours but it is worse libcxx with no impact on libstdc++? libcxx:
libstdc++ (with cout patch, without it crash immediatly): no impact (working) |
Description / Steps to reproduce the issue
I tried cxxtest on stm32f411e-disco and xmc4800-relax with the C++ toolchain enabled:
NuttShell (NSH) NuttX-12.7.0-RC0
nsh> cxxtest
prindump_assert_info: Current Version: NuttX 12.7.0-RC0 8fe6c0e Oct 9 2024 15:14:13 arm
dump_assert_info: Assertion failed panic: at file: :0 task: process: 0x800e905
up_dump_register: R0: 00000000 R1: 20005f20 R2: 00000005 R3: 00000100
up_dump_register: R4: 20000000 R5: 20005f20 R6: 00000000 FP: 00000000
up_dump_register: R8: 00000000 SB: 00000000 SL: 00000000 R11: 00000000
up_dump_register: IP: 20003f94 SP: 20005e80 LR: 0802c055 PC: 00000100
up_dump_register: xPSR: 60000000 PRIMASK: 00000000 CONTROL: 00000000
up_dump_register: EXC_RETURN: fffffffd
dump_stackinfo: User Stack:
dump_stackinfo: base: 0x200058d8
dump_stackinfo: size: 00002016
dump_stackinfo: sp: 0x20005e80
stack_dump: 0x20005e60: 00000000 20005f20 00000005 00000100 20003f94 0802c055 00000100 60000000
stack_dump: 0x20005e80: 20005ea8 20005f20 0805a570 0802c083 0805a618 20005ea8 0805a618 0802bbb1
stack_dump: 0x20005ea0: 0805a55c 0800e58d 0805a55c 0805add0 00000000 00000000 00000000 00000000
stack_dump: 0x20005ec0: 00000000 00000000 20003830 00000000 00000000 00000001 00000000 00000000
stack_dump: 0x20005ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000400 00000000
stack_dump: 0x20005f00: 00000000 00000000 20001f00 20003434 00000000 00000000 00000000 00000000
stack_dump: 0x20005f20: 0805a64c 00000006 00000000 00001002 00000000 00000005 20000000 20000048
stack_dump: 0x20005f40: 00000028 08003e7b 00000000 20000000 0805a5a8 00000006 00000000 00001002
stack_dump: 0x20005f60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
stack_dump: 0x20005f80: 00000000 00000000 00000000 20003830 00000000 00000000 00000000 20003468
stack_dump: 0x20005fa0: 20003440 20003448 00000000 00000000 00000000 00000008 20005f74 20003830
stack_dump: 0x20005fc0: 00000000 20000000 20005eac 20003468 20003440 20003448 0800e905 00000001
stack_dump: 0x20005fe0: 200058c8 0800e90d 20006120 08002651 20006133 08001f5d 20006048 00000001
stack_dump: 0x20006000: 200061dc 200054b8 00000001 20000e4c 00000000 00000000 00000000 00000000
stack_dump: 0x20006020: 00000000 fffffffd 00000002 20005554 20001f68 20000d34 00000003 0800c0e1
stack_dump: 0x20006040: 0800c0f4 01000000 ffffff80 00000003 200061c4 00000003 00000001 0800c02f
stack_dump: 0x20006060: 00000000 00000003 200060b8 00000000 00000000 00000000 00000000 00000000
stack_dump: 0x20006080: 00000000 00000000 00000000 0800e905 00000001 200058c8 00000000 08003f97
stack_dump: 0x200060a0: 0800e905 08001fbd 00000000 00000000 00000000 00000000 00000000 00000000
dump_tasks: PID GROUP PRI POLICY TYPE NPX STATE EVENT SIGMASK STACKBASE STACKSIZE COMMAND
dump_tasks: ---- --- --- -------- ------- --- ------- ---------- ---------------- 0x20000530 2048 irq
dump_task: 0 0 0 FIFO Kthread - Ready 0000000000000000 0x20003ac0 1008
dump_task: 1 1 100 RR Task - Waiting Semaphore 0000000000000000 0x20004590 2008
dump_task: 2 2 100 RR Task - Running 0000000000000000 0x200058d8 2016
I do not know how to investigate further.
On which OS does this issue occur?
[OS: Linux]
What is the version of your OS?
Debian testing
NuttX Version
master
Issue Architecture
[Arch: arm]
Issue Area
[Area: Applications]
Verification
The text was updated successfully, but these errors were encountered: