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

Unified Diff: runtime/vm/isolate.h

Issue 932983002: To satisfy ASAN, use stub instead of & operator to get C++ stack pointer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 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
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.h
===================================================================
--- runtime/vm/isolate.h (revision 43859)
+++ runtime/vm/isolate.h (working copy)
@@ -123,7 +123,7 @@
static void SetCurrent(Isolate* isolate);
static void InitOnce();
- static Isolate* Init(const char* name_prefix);
+ static Isolate* Init(const char* name_prefix, bool is_vm_isolate = false);
void Shutdown();
Isolate* ShallowCopy();
@@ -248,10 +248,15 @@
library_tag_handler_ = value;
}
+ void InitializeStackLimit();
void SetStackLimit(uword value);
void SetStackLimitFromStackBase(uword stack_base);
void ClearStackLimit();
+ // Returns the current C++ stack pointer. Equivalent taking the address of a
+ // stack allocated local, but plays well with AddressSanitizer.
+ static uword GetCurrentStackPointer();
+
uword stack_limit_address() const {
return reinterpret_cast<uword>(&stack_limit_);
}
@@ -794,7 +799,8 @@
if (saved_isolate_ != new_isolate_) {
ASSERT(Isolate::Current() == NULL);
Isolate::SetCurrent(new_isolate_);
- new_isolate_->SetStackLimitFromStackBase(reinterpret_cast<uword>(this));
+ new_isolate_->SetStackLimitFromStackBase(
+ Isolate::GetCurrentStackPointer());
}
}
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698