WebAssembly / WebAssembly/binaryen

Names section on the side

Open
#4,841 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
8.6k
Forks
885
Avg merge
1d 19h
Merged PRs (30d)
69

Description

Right now we have --symbolmap which emits a "symbol map" of indexes to function names. People normally run that, then strip the names and ship that binary. Then if a crash happens the function indexes in the crash can be used to reconstruct a full stack trace with names.

Another option is to save the wasm with DWARF and strip the DWARF from the shipping binary.

In a meeting just now some more ideas were raised by @dschuff and @tlively , documenting them here so we don't forget:

  • We could store the entire wasm binary with the names section on the side. Instead of --symbolmap, just saving the original binary is simpler, and it would contain the full names section - not just functions. That is a little similar to DWARF, but using the names section.
  • The emsymbolizer tool in emscripten could be improved to work on such files.
  • The emsymbolizer tool could run like c++filt and find all symbol-name-looking things and replace them in a given input string. That would allow more automatic reconstruction of stack traces.

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 with the --symbolmap entry point and the emsymbolizer tool mentioned in the issue. Determine whether the work should support sidecar wasm files, symbol-name replacement in input strings, or both, and clarify the desired format and behavior. Done should include an agreed scope, implementation, and tests for the selected workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
compilers, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.