Skip to content

Commit

Permalink
[vm/ffi] Fix double shadow space on safepoint slow path
Browse files Browse the repository at this point in the history
Fixes: #37175
Change-Id: I096a9c43ed0d500cc0d4f70a72ae53b156e1e1e2
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try, app-kernel-linux-debug-x64-try, vm-kernel-linux-debug-simdbc64-try,vm-kernel-mac-debug-simdbc64-try,vm-kernel-reload-mac-debug-simdbc64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try,vm-kernel-win-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105300
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
  • Loading branch information
dcharkes authored and commit-bot@chromium.org committed Jun 6, 2019
1 parent 04670fb commit e9b25d7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions runtime/vm/compiler/assembler/assembler_x64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ void Assembler::TransitionGeneratedToNative(Register destination_address,
movq(TMP,
Address(THR, compiler::target::Thread::enter_safepoint_stub_offset()));
movq(TMP, FieldAddress(TMP, compiler::target::Code::entry_point_offset()));
CallCFunction(TMP);
// Use call instead of CFunctionCall to prevent having to clean up shadow
// space afterwards. This is possible because safepoint stub has no arguments.
call(TMP);

Bind(&done);
}
Expand All @@ -209,7 +211,9 @@ void Assembler::TransitionNativeToGenerated() {
movq(TMP,
Address(THR, compiler::target::Thread::exit_safepoint_stub_offset()));
movq(TMP, FieldAddress(TMP, compiler::target::Code::entry_point_offset()));
CallCFunction(TMP);
// Use call instead of CFunctionCall to prevent having to clean up shadow
// space afterwards. This is possible because safepoint stub has no arguments.
call(TMP);

Bind(&done);

Expand Down

0 comments on commit e9b25d7

Please sign in to comment.