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
> 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
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
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
> 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
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
> 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