Skip to content

Commit

Permalink
run UBSAN in Linux in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tersec committed Sep 4, 2023
1 parent ecbcee1 commit 46edebc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
cpu: amd64
- os: windows
cpu: amd64
#- os: windows
#cpu: i386
branch: [version-1-6, version-2-0, devel]
include:
- target:
Expand Down
5 changes: 5 additions & 0 deletions snappy.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ let lang = getEnv("NIMLANG", "c") # Which backend (c/cpp/js)
let flags = getEnv("NIMFLAGS", "") # Extra flags for the compiler
let verbose = getEnv("V", "") notin ["", "0"]

const sanitize = "\"-fsanitize=undefined\""

let cfg =
" --styleCheck:usages --styleCheck:error" &
(if verbose: "" else: " --verbosity:0 --hints:off") &
(if defined(linux):
" --passC:" & sanitize & " --passL: " & sanitize
else: "") &
" --skipParentCfg --skipUserCfg --outdir:build --nimcache:build/nimcache -f"

proc build(args, path: string) =
Expand Down

0 comments on commit 46edebc

Please sign in to comment.