| Index: runtime/vm/isolate.cc
|
| diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
|
| index 4b1124785de7ad9019f6e452420de901fca1c876..0de6fd68299469cef0baf4498c70e6f3a6887a2b 100644
|
| --- a/runtime/vm/isolate.cc
|
| +++ b/runtime/vm/isolate.cc
|
| @@ -982,8 +982,13 @@ Isolate* Isolate::Init(const char* name_prefix,
|
| uword Isolate::GetCurrentStackPointer() {
|
| // Since AddressSanitizer's detect_stack_use_after_return instruments the
|
| // C++ code to give out fake stack addresses, we call a stub in that case.
|
| - uword (*func)() = reinterpret_cast<uword (*)()>(
|
| - StubCode::GetStackPointer_entry()->EntryPoint());
|
| + uword (*func)() =
|
| +#if !defined(TARGET_ARCH_DBC)
|
| + reinterpret_cast<uword (*)()>(
|
| + StubCode::GetStackPointer_entry()->EntryPoint());
|
| +#else
|
| + NULL;
|
| +#endif
|
| // But for performance (and to support simulators), we normally use a local.
|
| #if defined(__has_feature)
|
| #if __has_feature(address_sanitizer)
|
| @@ -1056,14 +1061,18 @@ void Isolate::BuildName(const char* name_prefix) {
|
|
|
| void Isolate::SetStackLimitFromStackBase(uword stack_base) {
|
| // Set stack limit.
|
| +#if !defined(TARGET_ARCH_DBC)
|
| #if defined(USING_SIMULATOR)
|
| // Ignore passed-in native stack top and use Simulator stack top.
|
| Simulator* sim = Simulator::Current(); // May allocate a simulator.
|
| ASSERT(simulator() == sim); // This isolate's simulator is the current one.
|
| stack_base = sim->StackTop();
|
| // The overflow area is accounted for by the simulator.
|
| -#endif
|
| +#endif // defined(USING_SIMULATOR)
|
| SetStackLimit(stack_base - OSThread::GetSpecifiedStackSize());
|
| +#else
|
| + SetStackLimit(Simulator::Current()->StackTop());
|
| +#endif // !defined(TARGET_ARCH_DBC)
|
| }
|
|
|
|
|
| @@ -1502,7 +1511,11 @@ void Isolate::ScheduleInterrupts(uword interrupt_bits) {
|
| }
|
|
|
| if (stack_limit_ == saved_stack_limit_) {
|
| +#if !defined(TARGET_ARCH_DBC)
|
| stack_limit_ = (~static_cast<uword>(0)) & ~kInterruptsMask;
|
| +#else
|
| + stack_limit_ = 0;
|
| +#endif
|
| }
|
| stack_limit_ |= interrupt_bits;
|
| }
|
| @@ -1549,7 +1562,11 @@ void Isolate::RestoreOOBMessageInterrupts() {
|
| deferred_interrupts_mask_ = 0;
|
| if (deferred_interrupts_ != 0) {
|
| if (stack_limit_ == saved_stack_limit_) {
|
| +#if !defined(TARGET_ARCH_DBC)
|
| stack_limit_ = (~static_cast<uword>(0)) & ~kInterruptsMask;
|
| +#else
|
| + stack_limit_ = 0;
|
| +#endif
|
| }
|
| stack_limit_ |= deferred_interrupts_;
|
| deferred_interrupts_ = 0;
|
|
|