CVSROOT:        /cvs
Module name:    src
Changes by:     morti...@cvs.openbsd.org        2019/07/31 19:09:09

Modified files:
        gnu/llvm/lib/Target/AArch64: AArch64TargetMachine.cpp 

Log message:
The GlobalISel IRTranslator pass assumes that it is safe to use the
LOAD_STACK_GUARD pseudo without consulting the value of useLoadStackGuardNode(),
and then tries to add the return from getSDagStackGuard() as a parameter without
consulting the return from getIRStackGuard() to see if it should do that. This
means that the GlobalISel IRTranslator's implementation for
Intrinsic::stackprotector is broken for platforms that implement
getIRStackGuard() like we do, and this causes a segfault later when the
incomplete LOAD_STACK_GUARD pseudo is lowered in the back end.

Since GlobalISel is disabled on aarch64 most of the time anyway, add a bit that
disables it for OpenBSD/aarch64 all the time.

Fixes a crash when building on aarch64 without retguard, with a stack protector
and without optimizations, which manifests when building cross-tools.

ok patrick@ deraadt@

Reply via email to