RTEMS | libmisc/stackchk: Add stack smashing protection (!277)

Joel Sherrill (@joel) gitlab at rtems.org
Mon May 12 20:21:41 UTC 2025




Joel Sherrill commented on a discussion on cpukit/include/rtems/stackchk.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/277#note_122569

 >   */
 >  extern const Stack_checker_Reporter_handler Stack_checker_Reporter;
 >  
 > +/**
 > + * @brief Stack smash protecting function
 > + * 
 > + * @note: This function is invoked if a stack overflow is detected
 > + *        if GCC flag -fstack-protection is enabled.
 > + */
 > +void __stack_chk_fail(void);

@gedare This code is in RTEMS. It should always be present in the RTEMS library. It will not be linked in if the application (or RTEMS) is not compiled with stack-protector on. In general, the application will turn on stack-protector. Do not put a guard around this.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/277#note_122569
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250512/309ce723/attachment-0001.htm>


More information about the bugs mailing list