nuttx-update/libs/libbuiltin
wangmingrong1 b99ca3f27b gcov: Disable stack checking
When enable CONFIG_STACK_CANARIES, in general, the stack check in the __gcov_fork function is:
" return fork();
18: e59f3020 ldr r3, [pc, #32] @ 40 <__gcov_fork+0x40>
1c: e5932000 ldr r2, [r3]
20: e59d3004 ldr r3, [sp, #4]
24: e0332002 eors r2, r3, r2
28: e3a03000 mov r3, #0
2c: 1a000002 bne 3c <__gcov_fork+0x3c>"
r3 is obtained by taking the value of sp offset. But after opening thumb, the second comparison value in
"8c6: 4a06 ldr r2, [pc, #24] @ (8e0 <__gcov_fork+0x30>)
8c8: 6811 ldr r1, [r2, #0]
8ca: 687a ldr r2, [r7, #4]
8cc: 4051 eors r1, r2"
is obtained through r7. Since r7 stores the stack address at this time, which stores the address of the parent process, the stack out of bounds will occur in the child process

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-18 23:05:52 +08:00
..
compiler-rt clang/gcov: Add a way to directly dump memory address 2024-11-25 18:03:19 +08:00
libgcc gcov: Disable stack checking 2024-12-18 23:05:52 +08:00
.gitignore clang:libclang_rt.builtins-xxx.a supports builtin 2024-10-28 16:38:45 +08:00
CMakeLists.txt clang:libclang_rt.builtins-xxx.a supports builtin 2024-10-28 16:38:45 +08:00
Kconfig gcov: Add toolchain gcov dependency option 2024-11-21 21:32:06 +08:00
Makefile gcov: Correct existing gcov configuration 2024-11-15 01:05:16 +08:00