[cfe-users] Stack buffer overflow protection

Dallman, John via cfe-users cfe-users at lists.llvm.org
Tue Sep 29 05:25:21 PDT 2015

I'm porting software to Apple's Clang 7.0, as released in Xcode 7.0. I'm not clear how that version number relates to the Clang 3.x version numbers.

I'm interested in turning on checking for stack buffer overflows. There's the GCC option -fstack-protector, and then there's the SafeStack sanitizer, http://clang.llvm.org/docs/SafeStack.html. However, that doesn't support linking DSOs, and that's actually vital for my purposes:  the product I'm working on is mathematical modelling libraries, delivered as DSOs.

So I think -fstack-protector is what I need to use, but I can't find any Clang documentation about it. Any suggestions?


John Dallman

Siemens Industry Software Limited is a limited company registered in England and Wales.
Registered number: 3476850.
Registered office: Faraday House, Sir William Siemens Square, Frimley, Surrey, GU16 8QD.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20150929/6105ff0b/attachment.html>

More information about the cfe-users mailing list