Skip to content

webkit: re-add -DUSE_SYSTEM_MALLOC=ON to Windows prebuilts #28101

@robobun

Description

@robobun

Context

bmalloc/libpas causes crashes on Windows under memory pressure during GC. See #28097, #26985, #26982.

The fix requires a coordinated change between oven-sh/WebKit and oven-sh/bun:

Upstream (oven-sh/WebKit)

Re-add -DUSE_SYSTEM_MALLOC=ON to the cmake invocation in windows-release.ps1:

 cmake -S . -B $WebKitBuild `
     -DPORT="JSCOnly" `
     -DENABLE_STATIC_JSC=ON `
+    -DUSE_SYSTEM_MALLOC=ON `
     ...

This was previously added in WebKit PR #97 (July 2025) but was removed in a later update. The current prebuilt WebKit for Windows (commit 00e825523d) does not have this flag.

Downstream (oven-sh/bun) — after prebuilts are rebuilt

  1. Remove bmalloc.lib from Windows link targets in cmake/targets/BuildBun.cmake
  2. Exclude bmallocLib(cfg) on Windows in scripts/build/deps/webkit.ts (TODO comments already added in fix(windows): disable bmalloc/libpas linking to fix crash #28098)
  3. Add CI regression guard (assertNoBmallocOnWindows)

Background

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions