Skip to content

Commit f998df7

Browse files
committed
Exclude known-safe QuickJS UBSan checks
- function: QuickJS calls JSCFunction* where actual type is JSCFunctionMagic* (union cast, ABI-compatible on all platforms) - unsigned-integer-overflow: hash functions intentionally wrap uint32_t (h * 263 + str[i]) Both are QuickJS-NG internals, not issues in our Zig code. Full test suite passes clean under UBSan with these exclusions.
1 parent b1acfed commit f998df7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/quickbeam/native.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ defmodule QuickBEAM.Native do
1717
end)
1818

1919
@quickjs_cflags if System.get_env("QUICKBEAM_UBSAN") == "1",
20-
do: ["-std=c11", "-D_GNU_SOURCE", "-fsanitize=undefined", "-fsanitize-trap=undefined"],
20+
do: ["-std=c11", "-D_GNU_SOURCE", "-fsanitize=undefined", "-fno-sanitize=function,unsigned-integer-overflow", "-fsanitize-trap=undefined"],
2121
else: ["-std=c11", "-D_GNU_SOURCE"]
2222

2323
use Zig,

0 commit comments

Comments
 (0)