-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
CONFIG_STACK_CANARIES does not work with native_sim #84078
Comments
cc @aescolar |
@erlingrj CONFIG_STACK_CANARIES is not supported in native_sim (in the posix architecture): Sidetrack:
You cannot select NEWLIB_LIBC with native_sim either. That's why kconfig goes back to picolibc. |
For clarification, there is no need to enable all the options in the bug description. It is enough to do From a quick look, it seems the reason why this particular feature does not work in native_sim is that, the kernel init is initializing If you want the equivalent functionality when building for native_sim you can add I'd close this as not an issue. |
Thank you for the explanation @aescolar that makes sense. It is not a problem for me to disable the stack canaries option, if it is a simple fix, then I think it would be very helpful with a warning/error from Kconfig if board is |
Describe the bug
The stack protection, enabled by
CONFIG_STACK_CANARIES=y
terminate trivial programs onnative_sim
when the POSIX API is used. When stepping through the code it appears to happen insidepthread_cond_wait
.To Reproduce
prj.conf
Note: For some reason just selecting
CONFIG_NEWLIB_LIBC=y
is not enough to get it compiled with newlib and get the stack protection working. It then just defaults back to picolib. But when selecting networking it selects newlib and I get this error.main.c
CMakeLists.txt
Compile and run:
Logs and console output
Environment (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: