Skip to content

Checkout swift headers - #12

Merged
jcmosc merged 12 commits into
mainfrom
checkout-swift-headers
Jan 10, 2026
Merged

jcmosc merged 12 commits into
mainfrom
checkout-swift-headers

Conversation

@jcmosc

@jcmosc jcmosc commented Jan 10, 2026

Copy link
Copy Markdown
Owner

No description provided.

@jcmosc
jcmosc merged commit f5fc4ad into main Jan 10, 2026
1 check passed
@jcmosc
jcmosc deleted the checkout-swift-headers branch January 10, 2026 20:39
harryzz added a commit to harryzz/Compute that referenced this pull request Jun 30, 2026
…y — fix jcmosc#14 + #383

Headline win this session: two genuine, independent AttributeGraph defects found + fixed
(both measurement/ASAN-proven, both faithful — no masks). Also captures accumulated wasm-port
work (jcmosc#12 subgraph liveness, size-safe HashTable, compare double-offset, faithful subgraph
storage refcount).

jcmosc#14  IndirectNode immutable ctor left _mutable uninitialized -> is_mutable() lies on a recycled
     wasm page -> immutable node cast to MutableIndirectNode -> output_edges() OOB write (corrupts
     an adjacent global -> render_frame jcmosc#14 "unknown handle" crash). Fix: _mutable(false).

#383 IAG::vector inline->heap realloc memcpy'd elements to the heap but left the
     T _inline_buffer[] MEMBER ARRAY intact -> the compiler auto-destructs it -> double ~cf_ptr ->
     double CFRelease -> subgraph-storage double-finalize -> abort (render_frame #383). Fix:
     memset the inline source to 0 after relocation (isolated ASAN repro in the superproject).

Result: 2048 renders the live board to frame 6600+, 0 crashes; oag-baseline 15/15 on wasm.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BLSARQMqYkUyHmKk6bUSwr
harryzz added a commit to harryzz/Compute that referenced this pull request Jul 15, 2026
…AF derefs

IAGTupleWithBuffer: the @_silgen_name swiftcc-closure binding lowered to a 6-arg
wasm import that disagreed with the real 4-arg C symbol (signature_mismatch trap
the first time a complex view — List/Section — built its child tuple via
PropertyList.merge; surfaced as the Settings/About crash). Route wasm32 through a
new plain-C IAGTupleWithBufferC + a non-capturing @convention(c) thunk, mirroring
IAGGraphInternAttributeTypeC. Non-wasm keeps the @_silgen_name fast path.

Graph.cpp UAF guards (defensive, mirror the existing [jcmosc#12] liveness rule):
- value_set_internal: on a recycled/dangling node the type-metadata mismatch path
  demangled the type name for its message, hitting the wasm demangler abort() that
  poisons the whole component. Make it non-fatal + skip + log pointers (no demangle).
- propagate_dirty: guard the INITIAL node (range + contains_subgraph) like the output
  edges; and fix a hole in the [jcmosc#12] loop guard — it only continued for an in-range
  offset with a deleted subgraph, so a WILD offset (>= ptr_max_offset) fell through to
  an OOB deref. Skip wild offsets first, then the deleted-subgraph case.

These reduce hard "cannot enter component instance" deaths but do NOT fix the root
pervasive graph-memory corruption (multiple deref surfaces, wild pointers past the
region). See .claude/memory/reference-openswiftui-immortal-fix.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AdiHfr6WfarqFgPMf9kKzm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant