Skip to content

Commit ded8a8a

Browse files
Remove stack protector check from runtime_init (#3155)
runtime_init will all the stack protector initializer from inside the function. Unfortunately that means that the sentinels for the runtime_init function will not be there and GCC will panic. Add no-stack-check attribute to the runtime_init function to avoid the check and re-enable stack smaeh protection. Fixes #3131
1 parent f62e680 commit ded8a8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/rp2040/sdkoverride/newlib_interface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ void __weak __assert_func(const char *file, int line, const char *func, const ch
170170
}
171171
GCC_Pragma("GCC diagnostic pop")
172172
#endif
173-
void runtime_init(void) {
173+
__attribute__((no_stack_protector)) void runtime_init(void) {
174174
#ifndef NDEBUG
175175
if (__get_current_exception()) {
176176
// crap; started in exception handler

0 commit comments

Comments
 (0)