Skip to content

Commit 25d94d8

Browse files
committed
Suppress UBSan alignment check for vendored tre library
tre-compile.c has misaligned struct access on Windows (UBSan kills the test runner). The misalignment is in vendored code we don't control. Add -fno-sanitize=alignment to tre test build only.
1 parent 0545400 commit 25d94d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile.cbm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ TRE_OBJ_TEST = $(BUILD_DIR)/tre.o
387387
TRE_OBJ_PROD = $(BUILD_DIR)/prod_tre.o
388388

389389
$(BUILD_DIR)/tre.o: $(TRE_SRC) | $(BUILD_DIR)
390-
$(CC) $(TRE_CFLAGS) $(SANITIZE) -c -o $@ $<
390+
$(CC) $(TRE_CFLAGS) $(SANITIZE) -fno-sanitize=alignment -c -o $@ $<
391391

392392
$(BUILD_DIR)/prod_tre.o: $(TRE_SRC) | $(BUILD_DIR)
393393
$(CC) $(TRE_CFLAGS) -O2 -c -o $@ $<

0 commit comments

Comments
 (0)