WebAssembly / WebAssembly/wabt

[wasm-objdump] File offset for relocation of custom sections is wrong

Open
#1,064 0 comments 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

It seems the section_starts_ is shared for all custom sections, so it ends up being overwritten if there are multiple custom sections in the binary. It probably should be changed to use the section index instead of the section code. @sbc100

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 in wasm-objdump's handling of custom-section relocations and trace how section_starts_ is populated and read. Verify with a binary containing multiple custom sections that each relocation reports the correct file offset.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, wasm
Domain
cli, compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.