Skip to content

compilePackages: immer produce() segfaults (SIGSEGV) #5135

Closed

Description

@proggeramlug

Perry: origin/main @ a674b6e (v0.5.1167) · macOS arm64
Setup: package compiled natively via perry.compilePackages (perry.allow.compilePackages: ["*"])
Build/run: perry repro.ts -o out && ./out

(Found via an internal real-package stress run — importing the real package and exercising it.)

Bug

Importing immer and calling produce(base, draft => {...}) crashes with SIGSEGV (exit 139), no output.

Repro

import { produce } from 'immer';

const base = { count: 0, list: [1, 2] };
const next = produce(base, (d) => { d.count++; d.list.push(3); });
console.log(base.count, next.count, next.list.join(','), base.list.length);

Expected (Node)

0 1 1,2,3 2

Actual (Perry)

(no output; SIGSEGV / exit 139)

Activity

  1. changed the title [-]compilePackages: immer segfaults (SIGSEGV)[/-] [+]compilePackages: immer produce() segfaults (SIGSEGV)[/+] on Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed defect or regression

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions