Skip to content

Commit

Permalink
Re-enable ASAN for the fuzzer
Browse files Browse the repository at this point in the history
Fixes IndianBoy42#131

Also touch the scanner to poke the fuzzer CI
  • Loading branch information
tgross35 committed Mar 3, 2024
1 parent 4427d40 commit b983b6f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ just_sha := "a2ff42e6c37ba5c429d444f3a18d3633e59f9a34" # 1.24.0
include_args := "-Isrc/ -I" + ts_path + "/lib/include -Inode_modules/nan"
general_cflags := "-Wall -Werror --pedantic -Wno-format-pedantic"

# FIXME: there are errors running with ASAN, we ideally want `,address` here
fuzzer_flags := env("FUZZER_FLAGS", "-fsanitize=fuzzer,undefined")
fuzzer_flags := env("FUZZER_FLAGS", "-fsanitize=fuzzer,address,undefined")
fuzz_time := env("FUZZ_TOTAL_TIME", "1200")

# Source files needed to build a parser
Expand Down
3 changes: 2 additions & 1 deletion src/scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ enum TokenType {
TOKEN_TYPE_END,
};

void assert_valid_token(const TSSymbol sym) {
__attribute__((unused)) static inline void
assert_valid_token(const TSSymbol sym) {
assertf(sym >= INDENT && sym < TOKEN_TYPE_END, "invalid symbol %d", sym);
}

Expand Down

0 comments on commit b983b6f

Please sign in to comment.