dart-sdk/tests/ffi
Martin Kustermann eba0e68e1a [vm/ffi] Allow Pointer objects to be shared across isolates
We consider `Pointer` objects as simple value types. We may unbox them
in the future to be simple integers - at which point our message sending
code wouldn't even know they are pointers anymore. There's therefore no
reason to prevent sending them across `SendPort`s.

Owners of `Pointer`s may implement `Finalizable` and sending such
finalizables across `SendPort`s is prohibited.

Closes https://github.com/dart-lang/sdk/issues/50457

TEST=vm/dart/isiolates/fast_object_copy*_test

Change-Id: Ia215d119c5bb0e48e2c5dc83cc82e132f46931c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350822
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2024-02-07 12:48:50 +00:00
..
generator [vm/ffi] Unwrap typed data in FFI calls 2023-12-12 00:05:02 +00:00
native_assets [vm/ffi] Initialize Library::ffi_native_resolver_ on deserializing snapshots 2024-01-16 11:58:48 +00:00
abi_specific_int_incomplete_aot_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
abi_specific_int_incomplete_jit_test.dart Revert "[ffi]: Remove pointer elementAt method." 2024-01-22 12:20:48 +00:00
abi_specific_int_test.dart Revert "[ffi]: Remove pointer elementAt method." 2024-01-22 12:20:48 +00:00
abi_test.dart [vm/ffi] Introduce Abi 2021-12-01 19:19:37 +00:00
aliasing_test.dart Revert "[ffi]: Remove pointer elementAt method." 2024-01-22 12:20:48 +00:00
all_positive.dart [vm/ffi] Fuchsia FFI testing package 2020-12-10 12:15:17 +00:00
allocator_test.dart [vm/ffi] Introduce Allocator API 2021-01-13 17:04:08 +00:00
analysis_options.yaml [tests] Remove obsolete Dart 3.0 experiments from FFI tests 2023-06-15 08:25:18 +00:00
async_callback_tests_utils.dart [vm/ffi] Closure callbacks for sync callbacks 2023-08-25 03:35:44 +00:00
async_void_function_callbacks_test.dart [ffi] Fix callback subtyping test 2024-02-05 03:19:01 +00:00
bool_test.dart [vm/ffi] Add Bool 2021-10-18 10:44:11 +00:00
c_types_test.dart [vm/ffi] Add Char C type 2022-03-28 09:46:56 +00:00
callback_tests_utils.dart [vm/ffi] Closure callbacks for sync callbacks 2023-08-25 03:35:44 +00:00
callback_unwind_error_test.dart [ffi] Add failing callback test with an Error that is not an UnhandledException. 2023-05-01 16:13:51 +00:00
calloc_test.dart Reland "[vm/ffi] Roll package:ffi to Allocator and Opaque" 2021-02-10 10:19:28 +00:00
coordinate.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
coordinate_nnbd_workaround.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
data_not_asan_test.dart [deps] Roll package:ffi to 2.0.1 2022-06-19 18:29:11 +00:00
data_test.dart Reland "[vm/ffi] Introduce Struct.create and Union.create" 2024-02-01 18:28:03 +00:00
dl_api_exit_enter_isolate_test.dart Reland "[vm] Expose Dart_{CurrentIsolate,ExitIsolate,EnterIsolate}" 2023-04-13 09:20:17 +00:00
dylib_close_test.dart [vm/ffi] Add DynamicLibrary.close() 2023-06-15 17:19:37 +00:00
dylib_isolates_test.dart [vm/ffi] Fix prepare_flutter_bundle.dart 2020-10-28 21:33:35 +00:00
dylib_open_test.dart [vm/ffi] Fix dylib_open_test on macOS 2023-12-21 07:38:49 +00:00
dylib_utils.dart [test/ffi] Fix tests on Fuchsia 2023-10-30 15:28:20 +00:00
expando_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
extension_methods_test.dart Revert "[ffi]: Remove pointer elementAt method." 2024-01-22 12:20:48 +00:00
external_typed_data_finalizer_test.dart [vm/ffi] Pointer.asTypedList finalizer 2023-05-10 11:38:57 +00:00
external_typed_data_test.dart Reland "[vm/ffi] Roll package:ffi to Allocator and Opaque" 2021-02-10 10:19:28 +00:00
ffi.status [vm/ffi] Update inner pointer accesses in IL 2024-02-01 18:28:53 +00:00
ffi_callback_unique_test.dart Reland "[vm] Migrate FFI callbacks to the new metadata system." 2023-06-06 02:07:58 +00:00
ffi_induce_a_crash_test.dart [vm] Fix unwinding records on Windows 2024-01-18 01:09:49 +00:00
ffi_native_test.dart [vm/ffi] Remove deprecated FfiNative 2023-11-20 13:16:28 +00:00
ffi_test_helpers.dart [vm] Implement NativeFinalizer 2022-03-26 09:41:21 +00:00
finalizer_external_size_accounting_test.dart [vm, gc] Add missing promotion of Finalizer external size. Remove race incrementing external size. 2022-11-30 17:14:59 +00:00
function_callbacks_many_test.dart [vm] Remove dual mapping of code 2024-01-09 12:36:55 +00:00
function_callbacks_structs_by_value_generated_test.dart [cleanup] Remove references to "nnbd" from FFI test generator 2023-11-21 09:03:19 +00:00
function_callbacks_structs_by_value_native_callable_generated_test.dart [cleanup] Remove references to "nnbd" from FFI test generator 2023-11-21 09:03:19 +00:00
function_callbacks_structs_by_value_test.dart Spelling tools 2023-01-09 15:48:57 +00:00
function_callbacks_subtype_test.dart [ffi] Fix callback subtyping test 2024-02-05 03:19:01 +00:00
function_callbacks_test.dart Revert "[ffi]: Remove pointer elementAt method." 2024-01-22 12:20:48 +00:00
function_callbacks_varargs_generated_test.dart [cleanup] Remove references to "nnbd" from FFI test generator 2023-11-21 09:03:19 +00:00
function_callbacks_varargs_native_callable_generated_test.dart [cleanup] Remove references to "nnbd" from FFI test generator 2023-11-21 09:03:19 +00:00
function_callbacks_very_many_test.dart [vm] Remove dual mapping of code 2024-01-09 12:36:55 +00:00
function_struct_by_value_out_of_bounds_test.dart [ffi]: Add extension operator methods(+,-) for pointer arithmetic 2023-12-14 11:42:38 +00:00
function_structs_by_value_generated_args_leaf_test.dart [vm, ffi] Round up checking for registers for small structs. 2023-10-17 23:01:17 +00:00
function_structs_by_value_generated_args_native_leaf_test.dart [vm, ffi] Round up checking for registers for small structs. 2023-10-17 23:01:17 +00:00
function_structs_by_value_generated_args_native_test.dart [vm, ffi] Round up checking for registers for small structs. 2023-10-17 23:01:17 +00:00
function_structs_by_value_generated_args_test.dart [vm, ffi] Round up checking for registers for small structs. 2023-10-17 23:01:17 +00:00
function_structs_by_value_generated_compounds.dart [vm, ffi] Round up checking for registers for small structs. 2023-10-17 23:01:17 +00:00
function_structs_by_value_generated_ret_arg_leaf_test.dart [ffi/tests] Split large auto-generated tests into multiple tests 2022-10-20 22:08:53 +00:00
function_structs_by_value_generated_ret_arg_native_leaf_test.dart [test/ffi] Beef up @Native testing 2023-02-24 21:16:50 +00:00
function_structs_by_value_generated_ret_arg_native_test.dart [test/ffi] Beef up @Native testing 2023-02-24 21:16:50 +00:00
function_structs_by_value_generated_ret_arg_test.dart [ffi/tests] Split large auto-generated tests into multiple tests 2022-10-20 22:08:53 +00:00
function_structs_by_value_generated_ret_leaf_test.dart Spelling runtime bin 2023-01-06 07:48:22 +00:00
function_structs_by_value_generated_ret_native_leaf_test.dart [test/ffi] Beef up @Native testing 2023-02-24 21:16:50 +00:00
function_structs_by_value_generated_ret_native_test.dart [test/ffi] Beef up @Native testing 2023-02-24 21:16:50 +00:00
function_structs_by_value_generated_ret_test.dart Spelling runtime bin 2023-01-06 07:48:22 +00:00
function_structs_test.dart Revert "[ffi]: Remove pointer elementAt method." 2024-01-22 12:20:48 +00:00
function_test.dart Revert "[ffi]: Remove pointer elementAt method." 2024-01-22 12:20:48 +00:00
function_varargs_generated_leaf_test.dart [vm, ffi] Round up checking for registers for small structs. 2023-10-17 23:01:17 +00:00
function_varargs_generated_native_leaf_test.dart [vm, ffi] Round up checking for registers for small structs. 2023-10-17 23:01:17 +00:00
function_varargs_generated_native_test.dart [vm, ffi] Round up checking for registers for small structs. 2023-10-17 23:01:17 +00:00
function_varargs_generated_test.dart [vm, ffi] Round up checking for registers for small structs. 2023-10-17 23:01:17 +00:00
function_varargs_name_test.dart [tests] Remove obsolete Dart 3.0 experiments from FFI tests 2023-06-15 08:25:18 +00:00
function_varargs_test.dart [tests] Remove obsolete Dart 3.0 experiments from FFI tests 2023-06-15 08:25:18 +00:00
function_very_many_test.dart [vm] Remove dual mapping of code 2024-01-09 12:36:55 +00:00
hardfp_test.dart [vm] Remove dual mapping of code 2024-01-09 12:36:55 +00:00
has_symbol_test.dart [vm/ffi] Support DynamicLibrary.process() on Windows 2022-09-27 08:42:03 +00:00
inline_array_multi_dimensional_test.dart [test/ffi] Split generated files on isLeaf 2021-10-14 13:05:33 +00:00
inline_array_test.dart [vm/ffi] Check Array<T extends AbiSpecificInt> bounds [] and []= 2024-01-05 12:35:49 +00:00
invoke_callback_after_suspension_test.dart [vm/ffi] Move ffi-callback related state from Thread to ObjectStore, move jit trampolines from Isolate to IsolateGroup 2023-05-17 11:23:28 +00:00
isolate_local_function_callbacks_test.dart [ffi] Fix callback subtyping test 2024-02-05 03:19:01 +00:00
native_callables_async_structs_by_value_generated_test.dart [vm, ffi] Round up checking for registers for small structs. 2023-10-17 23:01:17 +00:00
native_callables_sync_structs_by_value_generated_test.dart [vm, ffi] Round up checking for registers for small structs. 2023-10-17 23:01:17 +00:00
native_effect_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
negative_function_test.dart
pointer_arithmetic_operators_test.dart [tests/ffi]: Fix failing pointer arithmetic test. 2023-12-18 18:38:05 +00:00
regress_37254_test.dart [vm/ffi] Stop reifying type argument in Pointer 2022-11-28 09:45:45 +00:00
regress_39044_test.dart
regress_39063_test.dart [test/ffi] Fix errors in tests 2021-09-28 13:17:01 +00:00
regress_39885_test.dart Revert "[ffi]: Remove pointer elementAt method." 2024-01-22 12:20:48 +00:00
regress_40537_test.dart Fixed various typos in a lot of files 2022-07-25 12:21:59 +00:00
regress_43016_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_43693_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_44985_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_44986_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_45189_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_45198_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_45507_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_45988_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_46004_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_46085_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_46127_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_47594_test.dart [infra] Run JIT FFI tests on QEMU. 2023-05-26 23:22:32 +00:00
regress_47673_2_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_47673_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_49402_test.dart [vm/ffi] Fix constant Finalizables 2022-07-07 08:39:21 +00:00
regress_49684_test.dart [vm/ffi] Remove deprecated FfiNative 2023-11-20 13:16:28 +00:00
regress_51041_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_51315_test.dart [ffi]: Add extension operator methods(+,-) for pointer arithmetic 2023-12-14 11:42:38 +00:00
regress_51321_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_51504_test.dart [tests] Remove obsolete Dart 3.0 experiments from FFI tests 2023-06-15 08:25:18 +00:00
regress_51538_2_test.dart [cfe/ffi] Fix Finalizable in for( in ) loops 2023-03-02 09:05:19 +00:00
regress_51538_3_test.dart [cfe/ffi] Fix Finalizable in for( in ) loops 2023-03-02 09:05:19 +00:00
regress_51538_test.dart [cfe/ffi] Fix Finalizable in for( in ) loops 2023-03-02 09:05:19 +00:00
regress_51913_test.dart [cfe/ffi] Fix missing type argument on @Native 2023-04-05 16:24:30 +00:00
regress_52298_test.dart [analyzer/ffi] Fix spurious FFI errors 2023-05-08 15:16:05 +00:00
regress_52399_test.dart [vm/ffi] MSAN instrument StoreIndexedInstr x64 2023-09-19 16:51:30 +00:00
regress_b_261224444_test.dart [test/ffi] Free pointer allocated via malloc 2022-12-13 16:41:47 +00:00
regress_flutter79441_test.dart [vm/ffi] Fix representation of value for 8-bit and 16-bit FFI loads and stores 2021-04-06 21:11:23 +00:00
regress_flutter97301_test.dart [vm/test] Fix memory leak in ffi/regress_flutter97301_test 2022-02-03 00:28:55 +00:00
regress_jump_to_frame_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
sizeof_test.dart [vm/ffi] Introduce SizedNativeType 2024-01-12 10:13:39 +00:00
snapshot_test.dart [vm/ffi] Allow Pointer objects to be shared across isolates 2024-02-07 12:48:50 +00:00
stacktrace_regress_37910_test.dart
structs_nested_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
structs_nnbd_workaround_test.dart Revert "[ffi]: Remove pointer elementAt method." 2024-01-22 12:20:48 +00:00
structs_packed_test.dart [test/ffi] Split generated files on isLeaf 2021-10-14 13:05:33 +00:00
structs_test.dart Revert "[ffi]: Remove pointer elementAt method." 2024-01-22 12:20:48 +00:00
structs_typed_data_test.dart Reland "[vm/ffi] Introduce Struct.create and Union.create" 2024-02-01 18:28:03 +00:00
unaligned_test.dart Revert "[ffi]: Remove pointer elementAt method." 2024-01-22 12:20:48 +00:00
variance_function_test.dart [ffi] Fix callback subtyping test 2024-02-05 03:19:01 +00:00
very_large_struct.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
vmspecific_deprecated_funcs_test.dart [VM/Runtime] - Deprecate Dart_UpdateExternalSize and Dart_UpdateFinalizableExternalSize from the Dart C API 2023-07-20 17:06:44 +00:00
vmspecific_dynamic_library_test.dart [vm/ffi] Support DynamicLibrary.process() on Windows 2022-09-27 08:42:03 +00:00
vmspecific_enable_ffi_test.dart Reland "[vm/ffi] Roll package:ffi to Allocator and Opaque" 2021-02-10 10:19:28 +00:00
vmspecific_ffi_native_handles_test.dart [ffi/test] Skip handles test on Win AOT 2023-11-17 10:54:02 +00:00
vmspecific_ffi_native_test.dart [vm/ffi] Remove deprecated FfiNative 2023-11-20 13:16:28 +00:00
vmspecific_function_callbacks_exit_test.dart
vmspecific_function_callbacks_negative_test.dart
vmspecific_function_callbacks_test.dart [vm] Remove dual mapping of code 2024-01-09 12:36:55 +00:00
vmspecific_function_gc_test.dart [vm] Remove dual mapping of code 2024-01-09 12:36:55 +00:00
vmspecific_function_test.dart [vm] Remove dual mapping of code 2024-01-09 12:36:55 +00:00
vmspecific_handle_dynamically_linked_test.dart Expose Dart_Null_DL from dart_api_dl.h 2023-12-11 21:06:37 +00:00
vmspecific_handle_test.dart Reland "[vm/ffi] Throw on returning Error in Handle" 2022-10-03 12:25:08 +00:00
vmspecific_highmem_32bit_test.dart [test/ffi] Fix errors in tests 2021-09-28 13:17:01 +00:00
vmspecific_leaf_call_test.dart [test/ffi] Fix errors in tests 2021-09-28 13:17:01 +00:00
vmspecific_native_finalizer_2_test.dart [vm] Implement NativeFinalizer 2022-03-26 09:41:21 +00:00
vmspecific_native_finalizer_isolate_groups_test.dart [vm] Implement NativeFinalizer 2022-03-26 09:41:21 +00:00
vmspecific_native_finalizer_isolates_test.dart [vm/isolates] Introduce 'vm:isolate-unsendable' pragma. 2023-03-27 20:54:11 +00:00
vmspecific_native_finalizer_test.dart [vm] Implement NativeFinalizer 2022-03-26 09:41:21 +00:00
vmspecific_object_gc_test.dart
vmspecific_pointer_load_il_test.dart [vm/ffi] Update inner pointer accesses in IL 2024-02-01 18:28:53 +00:00
vmspecific_regress_37100_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
vmspecific_regress_37511_callbacks_test.dart [vm] Removes FLAG_enable_testing_pragmas from native_api_impl 2021-05-21 07:04:37 +00:00
vmspecific_regress_37511_test.dart Revert "[ffi]: Remove pointer elementAt method." 2024-01-22 12:20:48 +00:00
vmspecific_regress_37780_test.dart
vmspecific_regress_38993_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
vmspecific_regress_51794_test.dart [vm/ffi] Fix test on Android 2023-04-05 19:51:09 +00:00
vmspecific_send_port_id_test.dart
vmspecific_static_checks_ffinative_test.dart [vm/ffi] Remove deprecated FfiNative 2023-11-20 13:16:28 +00:00
vmspecific_static_checks_native_test.dart [vm/ffi] Support native array fields 2023-12-21 08:47:58 +00:00
vmspecific_static_checks_test.dart Reland "[vm/ffi] Introduce Struct.create and Union.create" 2024-02-01 18:28:03 +00:00
vmspecific_static_checks_varargs_test.dart Reland "Expire 3.0.0 experiment flags." 2023-11-17 13:10:01 +00:00
vmspecific_variance_function_checks_test.dart [ffi] Fix callback subtyping test 2024-02-05 03:19:01 +00:00