Skip to content

[pull] main from oven-sh:main - #5

Merged
pull[bot] merged 1 commit into
coleleavitt:mainfrom
oven-sh:main
Jul 20, 2026
Merged

pull[bot] merged 1 commit into
coleleavitt:mainfrom
oven-sh:main

Conversation

@pull

@pull pull Bot commented Jul 20, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )


Summary by cubic

Switches builds to ThinLTO and prevents ClassInfo address merging to fix a JSC JIT miscompile. Aligns Linux CI and local build defaults with ThinLTO for consistent builds.

  • Bug Fixes
    • Added CLASSINFO_KEEP_ADDRESS_UNIQUE(Class) in ClassInfo.h and applied it to affected builtins so s_info addresses remain distinct and aren’t merged under ThinLTO.
    • Changed LTO flags to -flto=thin -fno-split-lto-unit in .github/workflows/build-reusable.yml, Dockerfile, Dockerfile.musl, and build.ts to avoid miscompiles and match other platforms.

Written for commit a36c188. Summary will update on new commits.

Review in cubic

Switch the Linux glibc and musl LTO lanes (and the local build.ts /
Dockerfile defaults) from -flto=full to -flto=thin -fno-split-lto-unit,
matching the macOS and Windows lanes.

Under ThinLTO the JIT was miscompiled: JSC identifies types by comparing
ClassInfo (s_info) pointers, but a set of "boilerplate" builtins define
byte-identical s_info initializers ({ "Function"_s, &Base::s_info,
nullptr, nullptr, CREATE_METHOD_TABLE(X) }) whose defining TU never takes
the address, so clang emits them as local_unnamed_addr. With safe ICF at
link time those objects folded together (21 s_info collapsed onto 4
addresses, notably JSStrictFunction/JSSloppyFunction/JSArrowFunction with
BooleanConstructor), so the DFG treated ordinary function calls as calls to
the Boolean constructor and inlined them as Boolean(arg).

Add CLASSINFO_KEEP_ADDRESS_UNIQUE(Class), which references Class::info()
from a `used` no-op function via an asm operand, marking each s_info address
as significant so the optimizer can no longer treat it as mergeable. Apply
it to the 21 affected always-live builtins. The keeper functions are
removed by --gc-sections, so there is no size or runtime cost.
@pull pull Bot locked and limited conversation to collaborators Jul 20, 2026
@pull pull Bot added the ⤵️ pull label Jul 20, 2026
@pull
pull Bot merged commit a36c188 into coleleavitt:main Jul 20, 2026
1 check failed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant