trunk-rs / trunk-rs/trunk

Runtime Memory Error after Trunk Build (0.20.3)

Open
#855 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
4.4k
Forks
322
Avg merge
9d 15h
Merged PRs (30d)
2

Description

Hello! I encountered a runtime error when using Trunk 0.20.3, installed via cargo install trunk. The error only appeared when running after having built using a GitHub Actions workflow, not during local builds. When reverting to Trunk 0.20.2, the workflow worked fine.

Error Details:

"/rust/deps/dlmalloc-0.2.6/src/dlmalloc.rs:1198:13:
assertion failed: psize <= size + max_overhead

Stack:

Error
at imports.wbg.__wbg_new_abda76e883ba8a5f "

Workflow Configuration:

  - name: Install Trunk 0.20.3
    run: |
      cargo install trunk
      
 - name: Build project
    run: |
      cd $GITHUB_WORKSPACE
      RUSTFLAGS="-D unused-must_use" cargo build --target wasm32-unknown-unknown --release
      trunk build --release

The 0.20.2 binary worked without issues, while 0.20.3 caused this runtime problem. Appears to be something related to the integrity hashing or nonce.

Also noticed some release configurations added to Cargo.toml that I did not add that may have contributed but unsure of that.

Any insights on this discrepancy or potential fixes would be greatly appreciated. Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the mentioned GitHub Actions workflow, cargo build --target wasm32-unknown-unknown --release, and trunk build --release, comparing Trunk 0.20.2 with 0.20.3. Inspect the workflow and the release configurations in Cargo.toml, especially the reported integrity hashing or nonce changes. Done means the failing runtime build is explained and a fix or confirmed workaround is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, rust, wasm
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.