Skip to content

Commit 91b4fa8

Browse files
committed
[objective_c] Rename finalizable_test → gc_safepoint_test, note native assets >=3.10.0 in AOT repro
1 parent c3c3432 commit 91b4fa8

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,6 @@ app.*.map.json
141141

142142
# Gemini
143143
gemini.md
144+
145+
# FVM Version Cache
146+
.fvm/

pkgs/objective_c/test/gc_inject.m

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,16 @@
44

55
// GC injection helpers for regression-testing issue #3209.
66
//
7-
// Swizzles DOBJCDartProtocolBuilder's implementMethod:withBlock:... to force
8-
// a Dart GC before ObjC retains the block, making premature release
9-
// observable via the block's retain count.
7+
// Swizzles DOBJCDartProtocolBuilder's implementMethod:withBlock:... to inject
8+
// a Dart GC at the FFI safepoint between Dart extracting the raw block pointer
9+
// and Objective-C retaining it — the exact window where premature GC can
10+
// release the block before the handover completes.
11+
//
12+
// Run AOT to reproduce under production-like conditions — GC liveness issues
13+
// like this are unreliable in JIT (from pkgs/objective_c/).
14+
// Native assets must be enabled; stable from Dart 3.10.0:
15+
// dart compile exe test/gc_safepoint_test.dart -o /tmp/gc_test
16+
// DYLD_INSERT_LIBRARIES=.dart_tool/lib/objective_c.dylib /tmp/gc_test
1017

1118
#import <Foundation/Foundation.h>
1219
#import <objc/runtime.h>
File renamed without changes.

0 commit comments

Comments
 (0)