From e20c8d2579d350f52b2a2a695c4ae10b6d6e02bc Mon Sep 17 00:00:00 2001 From: Koko Bhadra Date: Fri, 13 Mar 2026 15:37:44 -0400 Subject: [PATCH] Revert "Fix XKCP alignment UBSan trap on aarch64" This reverts commit 47f5de533173f3cdbce6c75bb7964555954db0b6. --- build.zig | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/build.zig b/build.zig index c554d5b..a16f987 100644 --- a/build.zig +++ b/build.zig @@ -123,11 +123,7 @@ pub fn build(b: *std.Build) void { /// Add XKCP keccak C sources to a module with CPU-appropriate backend selection. fn addXkcp(b: *std.Build, module: *std.Build.Module, target: std.Build.ResolvedTarget) void { - // XKCP's plain64 backend casts input data to uint64_t* without alignment - // guarantees (KeccakP1600_plain64_AddLanes). Disable alignment sanitizer to - // avoid UBSan traps in debug builds; unaligned u64 loads are fast on all - // modern targets (x86_64, aarch64). - const c_flags = &.{ "-O3", "-fno-sanitize=alignment" }; + const c_flags = &.{"-O3"}; // Common include paths module.addIncludePath(b.path("src/crypto/xkcp/common"));