You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compute backend crashes during repeated dynamic view updates #2
Game2048 crashes after repeated moves when OpenSwiftUI uses the Compute backend. The crash occurs on both macOS and iOS. The AttributeGraph backend does not reproduce the issue.
Zombie diagnostics confirm that the subgraph has already been deallocated.
Root cause
Compute uses a custom vector with an inline capacity of 32 for the subgraph traversal stack.
When the stack exceeds that capacity, the vector relocates its elements to heap storage. However, its inline storage is a regular C++ array, so the array elements are also destroyed when the vector is destroyed. The stale inline copies release subgraph references again, which can deallocate subgraphs that still have owners.
Proposed fix
Use inline storage with explicit element lifetime management so that relocated elements are not destroyed again.
A regression test with 64 child subgraphs fails with SIGSEGV before the fix and passes afterward.
Activity