bytecodealliance / bytecodealliance/wasmtime

Cranelift: timing module for `cranelift-codegen` uses too much TLS space

Open
#3,654 5 comments 0 reactions 0 assignees View on GitHub
bug cranelift
Dominant language
Rust
Stars
18.6k
Forks
1.8k
Avg merge
1d 18h
Merged PRs (30d)
126

Description

### `.clif` Test Case

I think this is not relevant because it's an issue about thread-local usage.

https://github.com/bytecodealliance/wasmtime/blob/8043c1f919a77905255eded33e4e51a6fbfd1de1/cranelift/codegen/src/timing.rs#L178-L181

This is the issue

### Steps to Reproduce

1. git clone https://github.com/swc-project/swc.git
2. cd swc
3. git checkout d901b6222f8a77beed64968fcb4764bbacf8c755
3. yarn build
4. yarn test

### Expected Results

Tests should success

### Actual Results

`node.js` fails to load the swc node binding, because the node binding is using too much TLS space.

```
/swc/swc.linux-x64-gnu.node: cannot allocate memory in static TLS block
```

### Versions and Environment

Cranelift version or commit: Current master (https://github.com/bytecodealliance/wasmtime/commit/8043c1f919a77905255eded33e4e51a6fbfd1de1)

Operating system: linux with glibc

Architecture: gnu

### Extra Info

Is it fine to add a cargo feature like `disable-timing`?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.