swc: SWC has a segfault condition
This tracks a segfault issue in swc.
Related:
- https://github.com/vercel/next.js/issues/63924
- https://github.com/denoland/deno/pull/23187
- https://github.com/parcel-bundler/parcel/pull/9574
Bisecting
- From parcel PR:
swc_core@v0.89.6
=>swc_core@v0.90.22
- From deno PR:
swc_ecma_ast@0.112.4
worked. https://github.com/swc-project/swc/commit/7c5113b6a9c9b13d1d73cc12a8cdd9853dca98a0 bumped the version ofswc_ecma_ast
tov0.112.4
and https://github.com/swc-project/swc/commit/4fa09ebda3fa200b9c82f088cc744e493f98135c published the crates, ~so the previous commits are good~.
Related patches
- https://github.com/dudykr/ddbase/pull/27
- https://github.com/dudykr/ddbase/pull/29
- https://github.com/dudykr/ddbase/pull/31
- https://github.com/swc-project/swc/pull/8815
- https://github.com/swc-project/swc/pull/8818
- https://github.com/swc-project/swc/pull/8819
- https://github.com/swc-project/swc/pull/8836
- https://github.com/swc-project/swc/pull/8838
- https://github.com/swc-project/swc/pull/8839
- https://github.com/dudykr/ddbase/pull/33
About this issue
- Original URL
- State: closed
- Created 3 months ago
- Comments: 33 (24 by maintainers)
Commits related to this issue
- fix: upgrade deno_ast related crates (#23187) Had to revert back swc due to https://github.com/swc-project/swc/issues/8840 Fixes: - https://github.com/denoland/deno_lint/pull/1262 - https://g... — committed to denoland/deno by dsherret 3 months ago
- fix: upgrade deno_ast related crates (#23187) Had to revert back swc due to https://github.com/swc-project/swc/issues/8840 Fixes: - https://github.com/denoland/deno_lint/pull/1262 - https://g... — committed to denoland/deno by dsherret 3 months ago
- feat(es/transforms): Allocate stacks dynamically (#8867) **Description:** - This PR introduces an in-tree testing system for Deno. - This PR adds `stacker` cargo-feature to `swc_ecma_utils`. ... — committed to swc-project/swc by kdy1 2 months ago
- fix: upgrade deno_ast related crates (#23187) Had to revert back swc due to https://github.com/swc-project/swc/issues/8840 Fixes: - https://github.com/denoland/deno_lint/pull/1262 - https://g... — committed to littledivy/deno by dsherret 3 months ago
We just bumped LLVM from 16 to 17 on our CI and it appears to have fixed the crash we were seeing in Deno. It’s possible this was a miscompilation or LTO bug.
I’m curious what LLVM toolchains everyone else is using. I was never able to pin down a specific bit of UB that caused this, and our Miri builds have been clean.
@mmastrac I’ve had some concerns about potential bugs in hstr merging, but it doesn’t appear that
swc_atom
uses the merging functionality.Potentially the
alias
field could be removed entirely to save 64 bits per unique string.Hmmm… we were able to reproduce it with just this code: https://deno.land/x/which@0.3.0/mod.ts?source=