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

Mohamed Hassan (@Hamzi) gitlab at rtems.org
Fri Dec 27 20:33:07 UTC 2024




Mohamed Hassan commented on a discussion on testsuites/libtests/stackchk06/config.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/277#note_117333

 > +const char rtems_test_name[] = "STACKCHK06";
 > +
 > +RTEMS_NO_RETURN void __stack_chk_fail(void);
 > +
 > +/* configuration information */
 > +#define CONFIGURE_STACK_CHECKER_ENABLED
 > +
 > +RTEMS_NO_RETURN void __stack_chk_fail(void)
 > +{
 > +  // Custom handling for stack overflow
 > +  printk("Custom stack overflow handler invoked\n");
 > +  rtems_fatal(RTEMS_FATAL_SOURCE_STACK_CHECKER, true);
 > +}
 > +
 > +#define CONFIGURE_INIT
 > +#include "../stackchk05/system.h"

This to avoid unnecessary code duplication. I can create another identical version of the header for this tests however.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/277#note_117333
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/20241227/91559876/attachment-0001.htm>


More information about the bugs mailing list