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

Side by Side Diff: runtime/vm/thread.cc

Issue 2837873005: Fix some assertion failures on Fuchsia (Closed)
Patch Set: Created 3 years, 8 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
« runtime/bin/isolate_data.h ('K') | « runtime/bin/loader.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/thread.h" 5 #include "vm/thread.h"
6 6
7 #include "vm/compiler_stats.h" 7 #include "vm/compiler_stats.h"
8 #include "vm/dart_api_state.h" 8 #include "vm/dart_api_state.h"
9 #include "vm/growable_array.h" 9 #include "vm/growable_array.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 // Since AddressSanitizer's detect_stack_use_after_return instruments the 446 // Since AddressSanitizer's detect_stack_use_after_return instruments the
447 // C++ code to give out fake stack addresses, we call a stub in that case. 447 // C++ code to give out fake stack addresses, we call a stub in that case.
448 ASSERT(StubCode::GetStackPointer_entry() != NULL); 448 ASSERT(StubCode::GetStackPointer_entry() != NULL);
449 uword (*func)() = reinterpret_cast<uword (*)()>( 449 uword (*func)() = reinterpret_cast<uword (*)()>(
450 StubCode::GetStackPointer_entry()->EntryPoint()); 450 StubCode::GetStackPointer_entry()->EntryPoint());
451 #else 451 #else
452 uword (*func)() = NULL; 452 uword (*func)() = NULL;
453 #endif 453 #endif
454 // But for performance (and to support simulators), we normally use a local. 454 // But for performance (and to support simulators), we normally use a local.
455 #if defined(__has_feature) 455 #if defined(__has_feature)
456 #if __has_feature(address_sanitizer) 456 #if __has_feature(address_sanitizer) || __has_feature(safe_stack)
457 uword current_sp = func(); 457 uword current_sp = func();
458 return current_sp; 458 return current_sp;
459 #else 459 #else
460 uword stack_allocated_local_address = reinterpret_cast<uword>(&func); 460 uword stack_allocated_local_address = reinterpret_cast<uword>(&func);
461 return stack_allocated_local_address; 461 return stack_allocated_local_address;
462 #endif 462 #endif
463 #else 463 #else
464 uword stack_allocated_local_address = reinterpret_cast<uword>(&func); 464 uword stack_allocated_local_address = reinterpret_cast<uword>(&func);
465 return stack_allocated_local_address; 465 return stack_allocated_local_address;
466 #endif 466 #endif
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 905
906 DisableThreadInterruptsScope::~DisableThreadInterruptsScope() { 906 DisableThreadInterruptsScope::~DisableThreadInterruptsScope() {
907 if (thread() != NULL) { 907 if (thread() != NULL) {
908 OSThread* os_thread = thread()->os_thread(); 908 OSThread* os_thread = thread()->os_thread();
909 ASSERT(os_thread != NULL); 909 ASSERT(os_thread != NULL);
910 os_thread->EnableThreadInterrupts(); 910 os_thread->EnableThreadInterrupts();
911 } 911 }
912 } 912 }
913 913
914 } // namespace dart 914 } // namespace dart
OLDNEW
« runtime/bin/isolate_data.h ('K') | « runtime/bin/loader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698