Commit 331cb450 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[arm64] Avoid external reference for abort in embedded builtins

This CL uses segfaulting instructions in embedded builtins, instead of
a trap handler which require relocation and can hence not be used in
embedded builtins.

Bug: v8:7985, v8:6666

Change-Id: I87776785602f13d15f565d49b2332eb2adc62bd4
Reviewed-on: https://chromium-review.googlesource.com/1151192
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54724}
parent ba023371
......@@ -3000,6 +3000,13 @@ void TurboAssembler::Abort(AbortReason reason) {
TmpList()->Combine(MacroAssembler::DefaultTmpList());
if (should_abort_hard()) {
// TODO(7985): Isolate independent builtins cannot tolerate external
// references, so we just provoke a segfault to indicate the error.
if (options().isolate_independent_code) {
Move(x1, 0);
Ldr(x1, MemOperand(x1));
return;
}
// We don't care if we constructed a frame. Just pretend we did.
FrameScope assume_frame(this, StackFrame::NONE);
Mov(w0, static_cast<int>(reason));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment