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

Unified Diff: runtime/vm/exceptions.cc

Issue 927363004: Verify/document assumption about stack resource addresses. (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/allocation.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/exceptions.cc
===================================================================
--- runtime/vm/exceptions.cc (revision 43776)
+++ runtime/vm/exceptions.cc (working copy)
@@ -286,6 +286,14 @@
(reinterpret_cast<uword>(isolate->top_resource()) < stack_pointer)) {
isolate->top_resource()->~StackResource();
}
+#if defined(DEBUG)
+ // All remaining stack resources should be below stack_pointer.
+ StackResource* current = isolate->top_resource();
+ while (current != NULL) {
+ ASSERT(reinterpret_cast<uword>(current) > stack_pointer);
zra 2015/02/17 19:00:23 Is this the only place where this assertion is nee
koda 2015/02/17 19:07:54 Yes, we do the same thing in the simulators. We sh
+ current = current->previous();
+ }
+#endif // DEBUG
// Call a stub to set up the exception object in kExceptionObjectReg,
// to set up the stacktrace object in kStackTraceObjectReg, and to
« no previous file with comments | « runtime/vm/allocation.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698