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

Side by Side Diff: src/isolate.h

Issue 368053002: Stack overflow checkers are now compatible with ASAN's detect_stack_use_after_return mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/execution.cc ('k') | src/isolate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_ISOLATE_H_ 5 #ifndef V8_ISOLATE_H_
6 #define V8_ISOLATE_H_ 6 #define V8_ISOLATE_H_
7 7
8 #include "include/v8-debug.h" 8 #include "include/v8-debug.h"
9 #include "src/allocation.h" 9 #include "src/allocation.h"
10 #include "src/assert-scope.h" 10 #include "src/assert-scope.h"
(...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 1411
1412 1412
1413 // Support for checking for stack-overflows. 1413 // Support for checking for stack-overflows.
1414 class StackLimitCheck BASE_EMBEDDED { 1414 class StackLimitCheck BASE_EMBEDDED {
1415 public: 1415 public:
1416 explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { } 1416 explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { }
1417 1417
1418 // Use this to check for stack-overflows in C++ code. 1418 // Use this to check for stack-overflows in C++ code.
1419 inline bool HasOverflowed() const { 1419 inline bool HasOverflowed() const {
1420 StackGuard* stack_guard = isolate_->stack_guard(); 1420 StackGuard* stack_guard = isolate_->stack_guard();
1421 return reinterpret_cast<uintptr_t>(this) < stack_guard->real_climit(); 1421 return GetCurrentStackPosition() < stack_guard->real_climit();
1422 } 1422 }
1423 1423
1424 // Use this to check for stack-overflow when entering runtime from JS code. 1424 // Use this to check for stack-overflow when entering runtime from JS code.
1425 bool JsHasOverflowed() const; 1425 bool JsHasOverflowed() const;
1426 1426
1427 private: 1427 private:
1428 Isolate* isolate_; 1428 Isolate* isolate_;
1429 }; 1429 };
1430 1430
1431 1431
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
1525 } 1525 }
1526 1526
1527 EmbeddedVector<char, 128> filename_; 1527 EmbeddedVector<char, 128> filename_;
1528 FILE* file_; 1528 FILE* file_;
1529 int scope_depth_; 1529 int scope_depth_;
1530 }; 1530 };
1531 1531
1532 } } // namespace v8::internal 1532 } } // namespace v8::internal
1533 1533
1534 #endif // V8_ISOLATE_H_ 1534 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/execution.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698