Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(650)

Unified Diff: runtime/vm/assembler_arm64.cc

Issue 1574993003: Add --check-code-pointer flag for debug builds (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/assembler_arm64.cc
diff --git a/runtime/vm/assembler_arm64.cc b/runtime/vm/assembler_arm64.cc
index 062ad4b026942562e3c65b182b8cd013c52f5915..59c85c380dbed224f270ac583bf8d3ff17a8040d 100644
--- a/runtime/vm/assembler_arm64.cc
+++ b/runtime/vm/assembler_arm64.cc
@@ -22,9 +22,11 @@
namespace dart {
DECLARE_FLAG(bool, allow_absolute_addresses);
+DECLARE_FLAG(bool, check_code_pointer);
+DECLARE_FLAG(bool, inline_alloc);
+
DEFINE_FLAG(bool, use_far_branches, false, "Always use far branches");
DEFINE_FLAG(bool, print_stop_message, false, "Print stop message.");
-DECLARE_FLAG(bool, inline_alloc);
Assembler::Assembler(bool use_far_branches)
@@ -1081,6 +1083,9 @@ void Assembler::RestoreCodePointer() {
void Assembler::CheckCodePointer() {
#ifdef DEBUG
+ if (!FLAG_check_code_pointer) {
+ return;
+ }
Comment("CheckCodePointer");
Label cid_ok, instructions_ok;
Push(R0);

Powered by Google App Engine
This is Rietveld 408576698