Skip to content

Commit

Permalink
Build and run wasm2c-generated code under sanitizers in CI. NFC (#1856)
Browse files Browse the repository at this point in the history
Split out from #1843
  • Loading branch information
sbc100 authored Mar 9, 2022
1 parent d774f3a commit eed958b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ jobs:
runs-on: ubuntu-latest
env:
USE_NINJA: "1"
WASM2C_CFLAGS: "-fsanitize=address"
steps:
- uses: actions/setup-python@v1
with:
Expand All @@ -102,6 +103,7 @@ jobs:
runs-on: ubuntu-latest
env:
USE_NINJA: "1"
WASM2C_CFLAGS: "-fsanitize=undefined"
steps:
- uses: actions/setup-python@v1
with:
Expand Down
2 changes: 2 additions & 0 deletions test/run-spec-wasm2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import re
import struct
import sys
import shlex

import find_exe
import utils
Expand Down Expand Up @@ -405,6 +406,7 @@ def main(args):
wasm2c.AppendOptionalArgs({
'--enable-multi-memory': options.enable_multi_memory})

options.cflags += shlex.split(os.environ.get('WASM2C_CFLAGS', ''))
cc = utils.Executable(options.cc, *options.cflags, forward_stderr=True,
forward_stdout=True)
cc.verbose = options.print_cmd
Expand Down

0 comments on commit eed958b

Please sign in to comment.