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

Unified Diff: runtime/vm/dart_entry.cc

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.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_entry.cc
===================================================================
--- runtime/vm/dart_entry.cc (revision 43859)
+++ runtime/vm/dart_entry.cc (working copy)
@@ -31,19 +31,17 @@
class ScopedIsolateStackLimits : public ValueObject {
public:
explicit ScopedIsolateStackLimits(Isolate* isolate)
- : isolate_(isolate) {
+ : isolate_(isolate), stack_base_(Isolate::GetCurrentStackPointer()) {
ASSERT(isolate_ != NULL);
ASSERT(isolate_ == Isolate::Current());
- uword stack_base = reinterpret_cast<uword>(this);
- if (stack_base >= isolate_->stack_base()) {
- isolate_->SetStackLimitFromStackBase(stack_base);
+ if (stack_base_ >= isolate_->stack_base()) {
+ isolate_->SetStackLimitFromStackBase(stack_base_);
}
}
~ScopedIsolateStackLimits() {
ASSERT(isolate_ == Isolate::Current());
- uword stack_base = reinterpret_cast<uword>(this);
- if (isolate_->stack_base() == stack_base) {
+ if (isolate_->stack_base() == stack_base_) {
// Bottomed out.
isolate_->ClearStackLimit();
}
@@ -51,6 +49,7 @@
private:
Isolate* isolate_;
+ uword stack_base_;
};
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698