-
Notifications
You must be signed in to change notification settings - Fork 13.5k
release/20.x: Fix crash lowering stack guard on OpenBSD/aarch64. (#125416) #136458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@Sterling-Augustine What do you think about merging this PR to the release branch? |
ping @Sterling-Augustine |
@tstellar He doesn't seem to be around. I'd like to get this in as I can't build compiler-rt or openmp on aarch64 without it. |
I have no idea why this won't merge. |
There are certain steps of the cherry pick that are automated but the merge AFAIK is done manually by the release manager. He was waiting for your Ok. |
It's approved. |
TargetLoweringBase::getIRStackGuard refers to a platform-specific guard variable. Before this change, TargetLoweringBase::getSDagStackGuard only referred to a different variable. This means that SelectionDAGBuilder's getLoadStackGuard does not get memory operands. However, AArch64InstrInfo::expandPostRAPseudo assumes that the passed MachineInstr has nonzero memoperands, causing a segfault. We have two possible options here: either disabling the LOAD_STACK_GUARD node entirely in AArch64TargetLowering::useLoadStackGuardNode or just making the platform-specific values match across TargetLoweringBase. Here, we try the latter. (cherry picked from commit c180e24)
@brad0 (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR. |
Fixed compiler crash on OpenBSD/aarch64 when using stack protection by ensuring platform-specific guard variables are consistently referenced. |
Backport c180e24
Requested by: @brad0