|<< Back to previous view|
[PCC-367] -fstack-protector on OpenBSD Created: 02/Jul/11 Updated: 05/Jul/11
|Reporter:||Pascal Stumpf||Assignee:||Anders Magnusson|
Code compiled with stack protection fails to link on OpenBSD atm. pcc should use the functions provided as part of OpenBSD's libc, __guard and __stack_smash_handler. I don't really know what to do about __stack_chk_canary, though.
|Comment by Anders Magnusson [ 02/Jul/11 06:09 PM ]|
Have you verified that it works with the OpenBSD routines or must we rewrite something?
I\m not sure how this code works.
|Comment by Pascal Stumpf [ 02/Jul/11 06:29 PM ]|
Yes, protection against a simple testcase works:
(with input > 10 characters). One would only have to add support for printing the function name to the syslog (__stack_smash_handler() can take the function name as first argument).
|Comment by Iain Hibbert [ 04/Jul/11 11:11 AM ]|
except that the patch is wrong, please use
so that pcc can be cross-compiled correctly..
(in the long term, I would like to see such #ifdef removed from ccom,
perhaps replaced by a configure variable)
|Comment by Anders Magnusson [ 05/Jul/11 10:24 PM ]|
|Thanks, added (with the ifdef name change from Iain Hibbert).|