Files
sdk/runtime/vm/runtime_entry_dbc.cc
T
Ben Konyi fea5413d5a [ VM ] Fix hang of Flutter engine tests caused by global RuntimeEntry objects being destroyed when exit() is called when the VM hasn't finished shutting down.
This is due to how Windows destroys objects as destroyed objects have
their vtables reset to the vtable of the base class. If this happens
when an isolate hasn't finished shutting down and a virtual function
which is overriding a pure virtual function from the base class is
called, _purecall() is invoked and attempts to call exit() again which
leads to a deadlock.

See issue #35855 for more details.

Change-Id: I93a0e00549e7ee87a717a6cde01bf0848050384d
Reviewed-on: https://dart-review.googlesource.com/c/92000
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-02-06 22:37:24 +00:00

31 lines
855 B
C++

// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#include "vm/globals.h"
#if defined(TARGET_ARCH_DBC)
#include "vm/runtime_entry.h"
#include "vm/compiler/assembler/assembler.h"
#include "vm/simulator.h"
#include "vm/stub_code.h"
namespace dart {
uword RuntimeEntry::GetEntryPoint() const {
return reinterpret_cast<uword>(function());
}
#if !defined(DART_PRECOMPILED_RUNTIME)
void RuntimeEntry::CallInternal(const RuntimeEntry* runtime_entry,
Assembler* assembler,
intptr_t argument_count) {
UNIMPLEMENTED();
}
#endif // !defined(DART_PRECOMPILED_RUNTIME)
} // namespace dart
#endif // defined TARGET_ARCH_DBC