Repository navigation
bun: 1.3.14 -> 1.4.2 on llvm-23 (off frozen llvm-21) - #1477
Closed
bryan-minimal wants to merge 5 commits into
Closed
bryan-minimal wants to merge 5 commits into
bryan-minimal wants to merge 5 commits into
Conversation
bun 1.4 pins LLVM 23.1.x (scripts/build/ci-images/spec.ts; tools.ts accepts >=23.1.0 <23.1.99) and is a Rust rewrite with no Zig left, so the recipe moves to the prefixed llvm-23 and its 1.3.x workarounds are retired: - build.sh: /usr/lib/llvm-23/bin first on PATH, guarded on clang 23.1.x, on spec.ts's pinned LLVM still being 23.1.x, and on rustc's LLVM being 23 (bun's configure refuses a clang/rustc LLVM-major mismatch). - build.sh: bun 1.4 needs a nightly (#![feature] gates, -Zbuild-std always). Keep removing rust-toolchain.toml, set RUSTC_BOOTSTRAP=1 so minimal's stable rust accepts them, and check rust-src is in the sysroot. - Dropped the lol-html -Zbuild-std sed (lol-html is a workspace crate now) and the arm64 zig codegen-shard cap (no Zig in 1.4). - CVE-2026-111943: oven-sh/bun#46159 is in 1.4.x, so the emSign patch is dropped. build.sh checks root_certs.txt and still fingerprints the built binary; the negative control is now the check with ISRG Root X1 swapped in, since the stock bootstrap bun no longer bundles the emSign roots. - system-ca-store-default.patch: ported to 1.4.4 (Global.rs + the lazy-set root_certs.cpp), same behaviour. oven-sh/bun#46542 is not in 1.4.4. - build:release timeout 60 -> 120 min: every Rust crate and std now compile from source and there is no 1.4 build-bot timing yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
…chain") bun 1.4's own build assembles libjpeg-turbo's x86_64 SIMD sources with nasm (scripts/build/deps/libjpeg-turbo.ts, compile.ts nasm()). 1.3.x did not need it. The rest of 1.4.4's required tools (cmake, perl, GNU strip, git, unzip, tar, the LLVM tools, rustc/cargo) are already in the closure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…put) build-bot on 5748e42: "ninja: error: rebuilding 'build.ninja': '../../rust-toolchain.toml', needed by 'rust-target/plan.json', missing and no known rule to make it". bun 1.4's scripts/build/rust.ts lists the file among the plan edge's inputs. Its only other use is reading `channel` into RUSTUP_TOOLCHAIN, which an empty file skips. A guard fails the build if upstream stops pinning a nightly there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
build-bot on 942d51e failed in bun_collections: `core::mem::type_info::of` (multi_array_list.rs:321) first ships in Rust 1.100.0, and pkgs rust is 1.99.1. bun 1.4.3/1.4.4 pin nightly-2026-09-15 and use it; 1.4.0-1.4.2 pin nightly-2026-07-20, which predates the 1.99 beta branch. - version 1.4.2, verified source + bootstrap zip sha256s (the zips match the release's SHASUMS256.txt). - LLVM: 1.4.2 pins 21.1.x. build.sh sets its documented override BUN_TOOLCHAIN_LLVM=/usr/lib/llvm-23 (an LLVM prefix; configure then looks only in its bin/ and skips the version check), puts the same bin/ first on PATH, and fails unless clang there reports 23.*, `command -v clang` is that clang, tools.ts still reads the variable and still pins 21. - CVE-2026-111943: oven-sh/bun#46159 is not in 1.4.2, which embeds the store as the binary root_certs.der. build.sh rewrites it with the bootstrap bun (pinned to 1.4.2's file sha256), dropping exactly the three emSign DERs by sha256 (121 -> 118), and their labels from root_certs.txt. The control is the stock bootstrap bun again (it still bundles all three). - system-ca-store-default.patch re-ported: 1.4.2 still has Arguments.rs's Bun__Node__CAStore (Bundled/Openssl/System), so its default flips to System as on 1.3.14; root_certs.cpp (identical in 1.4.2 and 1.4.4) reads it. - 1.4.2 uses ninja from PATH (our ninja package): no bun-ninja fetch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
build-bot: highway_strings.cpp:2628 'alias and aliasee have different types' [-Werror,-Wattribute-alias]. bun-v1.4.4 (oven-sh/bun 38afee6) replaced the alias with a forwarding definition; carry that hunk for 1.4.2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Superseded by #1492 (bun 1.4.4, green on build-bot, fixes the 3 HIGHs that 1.4.2 does not). 1.4.2 on clang 23 also needs C++ fixes ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves bun off the frozen
llvm-21(pkgs#1339) onto LLVM 23, at bun 1.4.2.Why 1.4.2 and not 1.4.4: bun 1.4.3 and 1.4.4 (nightly-2026-09-15) call
core::mem::type_info::of(bun_collectionsmulti_array_list.rs:321). That function first ships in Rust 1.100.0, and pkgsrustis 1.99.1, so the build-bot run on 942d51e failed with E0425. bun 1.4.0–1.4.2 pin nightly-2026-07-20, which predates the 1.99 beta branch. 1.4.4 has to wait for the pkgs rust 1.100 bump, because it needscore::mem::type_info::of(Rust ≥ 1.100).LLVM
scripts/build/tools.ts, which accepts only 21.1.x). Its documented override isBUN_TOOLCHAIN_LLVM, an LLVM prefix (the directory holdingbin/clang). Once it's set, configure looks only in thatbin/and skips the version check. It also turnsworkarounds.ts's expiry tripwires from errors into warnings.BUN_TOOLCHAIN_LLVM=/usr/lib/llvm-23and puts itsbin/first on PATH, so CC and the cargo linker use the same clang. It then fails unless all of these hold:clang,clang++,ld.lld,llvm-arandllvm-ranlibexist there;clang version 23.;command -v clangis that clang;tools.tsstill readsBUN_TOOLCHAIN_LLVMand still pins 21;llvm-23(prefixed) andnasm. 1.4.2 usesninjafrom PATH, so ourninjapackage runs the build and nothing fetches bun-ninja.Carried changes, checked against the 1.4.2 tree
Rust:
rust-toolchain.tomlis emptied (it's a ninja input), with a guard that upstream still pins a nightly there.RUSTC_BOOTSTRAP=1is set, and build.sh checks that rust-src is in the sysroot (-Zbuild-std). 1.4.2 has no Zig, so the zig and lol-html workarounds stay removed.CVE-2026-111943: crypto: update root certificates oven-sh/bun#46159 is not in 1.4.2. Its store is the binary
packages/bun-usockets/root_certs.der(u32 count,u32 offsets[count+1], then the DERs). build.sh rewrites that file with the bootstrap bun:c17ba7ff…4a29;root_certs.txt.I checked the filter locally on a copy of the 1.4.2 file: the other 118 entries are identical and in order, and a second run on the already-filtered file fails. The control is once again the stock bootstrap bun, which must fail the check and name all three roots. The built binary is still fingerprinted.
system-ca-store-default.patch, re-ported: 1.4.2 still hasBun__Node__CAStore(Bundled/Openssl/System) insrc/runtime/cli/Arguments.rs, so the patch flips its default to System, as on 1.3.14.root_certs.cppis byte-identical between 1.4.2 and 1.4.4, so its hunk is the same as in the 1.4.4 port. The patch applies cleanly tobun-v1.4.2and is rejected by 1.4.4. Every grep guard passes on the patched tree.Hashes (verified)
bun-v1.4.2:e14670b117d69012d828514d657f0a3133d1c25d13d69461184d05b6a8e9a876(codeloadrefs/tags/bun-v1.4.2, top directorybun-bun-v1.4.2/).bun-linux-x64.zip:36368faef7527875d5ffa52e53cd48021741f2a83eb6208a8dd64068d422a913.bun-linux-aarch64.zip:54328bbc2d9c8e0c9f892c544d66c57a83b84139e34909e5ee81758f1ac8fda7. Both match the release'sSHASUMS256.txt.All URLs are upstream GitHub, so there's nothing to mirror.
What 1.4.3/1.4.4 fix that we don't get yet
Upstream's release notes mark nothing as a security fix. Going by commit titles in
bun-v1.4.2..bun-v1.4.4, these are the security-relevant ones:end().--hot: a use-after-free of the entry point's promise (dev mode).Risks (nothing built locally)
RUSTC_BOOTSTRAP=1is building code written for nightly-2026-07-20.Follow-ups (pkgmgr-rs)
data/series_pins.toml[bun] series = "1.3": change it to1.4.2(exact), with "until rust ≥ 1.100" as the reason.data/pkgs_fixtures.tomltrackspackages/bun/build.ncl, so fixture drift will flag it.Rebuilds: bun plus hunk, opencode and plannotator.
🤖 Generated with Claude Code