WebAssembly / WebAssembly/wasi-sdk

SDK should support Address Sanitizer

Open
#553 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
CMake
Stars
1.6k
Forks
237
Avg merge
18h 26m
Merged PRs (30d)
5

Description

Per https://github.com/llvm/llvm-project/issues/151015#issuecomment-3130203774.

Right now, it is just disabled:

$ /opt/wasi-sdk/bin/clang -fsanitize=address test.c
clang: error: unsupported option '-fsanitize=address' for target 'wasm32-unknown-wasi'

Personally, I don't really know how ASan would work, since I believe it relies on a block of shadow memory somewhere high in address space normally. Would that be just a new linear memory just for that purpose? I'm not familiar with ASan implementation, I assume @sbc100 knows how it is supposed to work.

Contributor guide

No contributing guide indexed for this repository

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 clang command shown for the wasm32-unknown-wasi target and read the linked LLVM issue and discussion. Investigate how Address Sanitizer shadow memory is expected to work for WebAssembly and how wasi-sdk currently disables the option. Done means the SDK accepts and correctly supports -fsanitize=address for this target.

Written by the indexing model from the issue text.

Assessment

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