[cfe-users] Stack buffer overflow protection

2015-09-29 Thread Dallman, John via cfe-users
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 sanitize

Re: [cfe-users] Stack buffer overflow protection

2015-09-30 Thread Dallman, John via cfe-users
> 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. clang -v reveals that Apple LLVM 7.0.0 is based on LLVM 3.7.0svn. > So I think -fstack-protector is what I need to use, but I can't find any

[cfe-users] Clang equivalent to -fsignalling-nans?

2016-08-17 Thread Dallman, John via cfe-users
I'm using a new version of Clang from Apple, targeting macOS 10.12, which comes from an Xcode that is still in beta. I'm compiling C code, rather than C++. I'm hitting problems with the compiler assuming that floating-point divides won't trap, and executing them speculatively, in advance of the

[cfe-users] Prospects of Clang acquiring an equivalent of MSVC's /QSpectre?

2018-02-15 Thread Dallman, John via cfe-users
As far as I've been able to learn, the only way to avoid security vulnerabilities due to Spectre variant 1 (CVE-2017-5753, "bounds check bypass") is to insert fences to control the relevant speculative reads. I'm interested in doing this because I work on a numerical modelling library that is us

Re: [cfe-users] Prospects of Clang acquiring an equivalent of MSVC's /QSpectre?

2018-02-15 Thread Dallman, John via cfe-users
> MSVC has recently gained a /QSpectre option that tries to do this for you > (https://blogs.msdn.microsoft.com/vcblog/2018/01/15/spectre-mitigations-in-msvc/). > While this can't be completely fool-proof, I can well believe that it will do > as good a job as bored humans, and is much cheaper. I w

[cfe-users] Floating-point traps on x86-64

2019-03-05 Thread Dallman, John via cfe-users
I produce a mathematical modelling library on several platforms, including iOS, macOS and Android, all of which use Clang. Where the hardware can generate floating-point traps, I prefer to run testing with traps for Invalid Operation, Divide-by-Zero and Overflow turned on, since that finds me pr

Re: [cfe-users] Building with Clang (on Windows) - but for Linux

2020-08-26 Thread Dallman, John via cfe-users
> BTW - I often see Clang described as "llvm" or "cfe" and I've often wondered > what they stand for ?? LLVM is "Low Level Virtual Machine". That name is a bit confusing, because this isn't the kind of "Virtual Machine" you get from VMWare or the like, but a way of representing programs for a n