dart-sdk/runtime/lib
Daco Harkes 4b322a398a [vm] Finalizer / NativeFinalizer fixes
1. Run native finalizers before sending isolate exit message. This way
   users can rely on the isolate exit message for both (1) no Dart code
   executing anymore on that isolate _and_ (2) all native finalizers
   having run. Alternatively, we could opt to not provide this second
   guarantee and document this.

2. Fix UBSAN error by making SetArgumentTo42's argument a `void*`.

3. Fix bug in debug mode, stop reading tags from forwarding addresses.

4. Small optimization: Don't promote 0 bytes from new to old space.

5. Skip finalizer_isolate_groups_run_gc_test in optcounter mode.
   In hot reload mode, GC is guaranteed to run. On all other bots GC
   does not run (nothing happens in the other isolate group). However,
   in optcounter mode enough happens in the other isolate group to
   trigger GCs. Alternatively, we could loosen the test to allow either
   a GC to happen or not.

TEST=runtime/tests/vm/dart(_2)/finalizer/*
TEST=runtime/tests/vm/dart(_2)/isolates/fast_object_copy_test.dart
TEST=runtime/vm/object_test.cc
TEST=tests/ffi(_2)/vmspecific_native_finalizer_*

Closes: https://github.com/dart-lang/sdk/issues/48740
Closes: https://github.com/dart-lang/sdk/issues/48715
Closes: https://github.com/dart-lang/sdk/issues/48674

Change-Id: I5e260e087aef48524f2214f5b332caeda18f2e37
Cq-Include-Trybots: luci.dart.try:vm-kernel-ubsan-linux-release-x64-try,vm-kernel-precomp-ubsan-linux-release-x64-try,vm-canary-linux-debug-try,vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-optcounter-threshold-linux-release-ia32-try,app-kernel-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240043
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-04-07 07:05:27 +00:00
..
array.cc [vm] Make naming more consistent when converting between handles, tagged and untagged pointers. 2021-01-15 23:32:02 +00:00
async.cc [vm] refactor native entry and native entry type arguments 2018-12-13 19:29:26 +00:00
async_sources.gni [NNBD/VM] Restructure VM patch files for the NNBD dart sdk split 2019-09-19 03:57:30 +00:00
bool.cc [vm] Make naming more consistent when converting between handles, tagged and untagged pointers. 2021-01-15 23:32:02 +00:00
convert_sources.gni Fix sources to source_set 2019-05-21 17:01:48 +00:00
core_sources.gni [vm] Remove dead runtime entries for WeakProperty 2022-01-18 19:15:25 +00:00
date.cc [vm] refactor native entry and native entry type arguments 2018-12-13 19:29:26 +00:00
developer.cc [vm] Make naming more consistent when converting between handles, tagged and untagged pointers. 2021-01-15 23:32:02 +00:00
developer_sources.gni [NNBD/VM] Restructure VM patch files for the NNBD dart sdk split 2019-09-19 03:57:30 +00:00
double.cc [vm] Faster double.toInt() in AOT mode 2021-09-01 16:57:59 +00:00
errors.cc [vm] Remove some dead error entry points. 2022-02-03 17:55:16 +00:00
ffi.cc [vm] Finalizer / NativeFinalizer fixes 2022-04-07 07:05:27 +00:00
ffi_dynamic_library.cc [vm] Remove support for dart-ext: imports 2021-09-02 14:14:35 +00:00
ffi_sources.gni [NNBD/VM] Restructure VM patch files for the NNBD dart sdk split 2019-09-19 03:57:30 +00:00
function.cc [vm] Fix equality of closures instantiated from the same closure 2021-10-06 00:24:02 +00:00
growable_array.cc [vm] Make naming more consistent when converting between handles, tagged and untagged pointers. 2021-01-15 23:32:02 +00:00
identical.cc [vm] Make naming more consistent when converting between handles, tagged and untagged pointers. 2021-01-15 23:32:02 +00:00
integers.cc [vm, compiler] Remove intrinsics from internal double-dispatching int methods. 2021-03-01 19:29:00 +00:00
invocation_mirror.h Revert "Revert "Dart Core Lib change to support generic functions in class NoSuchMethodError."" 2017-09-28 00:27:24 +00:00
isolate.cc [vm] Implement NativeFinalizer 2022-03-26 09:41:21 +00:00
isolate_sources.gni [NNBD/VM] Restructure VM patch files for the NNBD dart sdk split 2019-09-19 03:57:30 +00:00
libgen_in.cc Windows: Link library sources into gen_snapshot/dart_bootstrap 2017-02-01 15:55:59 -08:00
math.cc [vm] Cleanup workarounds for removed flag --throw_on_javascript_int_overflow. 2022-02-03 21:10:46 +00:00
math_sources.gni [NNBD/VM] Restructure VM patch files for the NNBD dart sdk split 2019-09-19 03:57:30 +00:00
mirrors.cc [vm] Remove overlap between Function and FunctionType. 2021-07-02 14:26:04 +00:00
mirrors.h [VM] Implement isExtensionMember in MethodMirror and VariableMirror 2019-10-09 00:27:30 +00:00
mirrors_sources.gni [NNBD/VM] Restructure VM patch files for the NNBD dart sdk split 2019-09-19 03:57:30 +00:00
object.cc [vm, gc] Don't perform blocking compactions in response to Dart_NotifyLowMemory. 2022-03-08 22:42:46 +00:00
profiler.cc [ VM / Service ] Add UserTag support to C-API and send UserTagChanged 2021-06-23 00:58:47 +00:00
profiler_sources.gni Fix sources to source_set 2019-05-21 17:01:48 +00:00
regexp.cc [vm] Switch most Instances whose layout is determined in C++ to compressed pointers. 2021-04-05 17:43:16 +00:00
simd128.cc [vm] Make naming more consistent when converting between handles, tagged and untagged pointers. 2021-01-15 23:32:02 +00:00
stacktrace.cc Reland "[vm] Remove --causal-async-stacks flag" 2021-07-02 14:26:46 +00:00
stacktrace.h Reland "[ Service / dart:isolate ] Added getPorts RPC and 'debugName' optional" 2020-10-29 02:52:03 +00:00
stopwatch.cc [vm] refactor native entry and native entry type arguments 2018-12-13 19:29:26 +00:00
string.cc [vm] Alternate fix for mismatch between native and intrinsic versions of writeIntoOneByteString. 2022-01-21 19:32:40 +00:00
timeline.cc [vm] Make naming more consistent when converting between handles, tagged and untagged pointers. 2021-01-15 23:32:02 +00:00
typed_data.cc [vm] Make use of the new TypedDataBase to avoid redundant code in the runtime. 2021-06-08 19:15:38 +00:00
typed_data_sources.gni [NNBD/VM] Restructure VM patch files for the NNBD dart sdk split 2019-09-19 03:57:30 +00:00
uri.cc [vm] Reland: Prefix HOST_OS_* and TARGET_OS_* with DART_ 2021-07-02 19:06:45 +00:00
vmservice.cc Reland "[ VM / Service ] Omit private fields from service responses by default" 2022-01-11 23:35:28 +00:00
vmservice_sources.gni Fix sources to source_set 2019-05-21 17:01:48 +00:00