WebAssembly / WebAssembly/wabt

Decompiler can run out of stack space

Open
#1,591 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
8.1k
Forks
827
Avg merge
4d 6h
Merged PRs (30d)
18

Description

In particular, DecompileExpr calls itself recursively.

Example that fails: clang -O2 quickjs.c -c runs out of stack at VC++ default stack size of 1MB.

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

Start at the recursive DecompileExpr entry point and reproduce the failure with clang -O2 quickjs.c -c. Investigate why this recursion exceeds the VC++ default 1MB stack; done means the command completes without running out of stack space.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, wasm
Domain
compilers, devtools
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.