Skip to content

react-reconciler 0.33 init crashes under Perry — SIGBUS on import (standalone) / 'undefined is not iterable' in createReconciler (in-ink); blocks all custom React renderers #4898

@proggeramlug

Description

@proggeramlug

Summary

Importing react-reconciler crashes at module load under Perry. The next ink wall after the regex fixes (#4889): with MessageChannel/Segmenter/\p{Surrogate}/\p{RGI_Emoji} all fixed, every leaf dep and react itself now initialize cleanly — but the React reconciler does not.

Two symptoms, same area (react-reconciler 0.33.0 + react 19.2.7):

  1. Standalone — native crash (SIGBUS, exit 138) at import, before any user statement runs:

    // rr.ts
    import createReconciler from 'react-reconciler';
    console.log('reached');   // never prints
    $ perry compile rr.ts -o rr && ./rr ; echo $?
    138              # 128 + SIGBUS(10), no stdout/stderr
    

    (perry.define NODE_ENV=production; both react-reconciler.{production,development}.js get compiled in, but the dev build is runtime-guarded by "production" !== process.env.NODE_ENV && (…), so the prod path is what loads. The prod file's top level is only module.exports = function($$$config){…} — so the crash is in how Perry loads/links that cjs module, not in JS logic.)

  2. Inside ink — TypeError: undefined is not iterable at init: ink/build/reconciler.js:85 runs createReconciler(hostConfig) at module top level, and that throws (clean JS error, not SIGBUS) when ink is compiled with tree-shaking. So in the fuller graph react-reconciler loads far enough to call the factory, then dies iterating something undefined during reconciler construction.

The differing symptom (native SIGBUS standalone vs. JS undefined is not iterable in-ink) suggests build/graph-dependent codegen — possibly more than one bug — but both block any react-reconciler-based renderer.

Repro environment

Why it matters

Asks / triage pointers

  • A native SIGBUS at cjs-module load with a trivial module.exports = function(){} body points at the cjs require/interop or module-init codegen for this specific large minified file — worth a --trace llvm on the react-reconciler.production module init.
  • Likely related: Captured Object.assign alias causes react-reconciler HostRoot render hang #2564 (captured Object.assign alias → react-reconciler HostRoot render hang) — same package, possibly same alias/codegen family.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions