authorgravatar for david@vortan.devDavid Rubin <david@vortan.dev> 2025-02-03 00:04:12-08:00
committergravatar for david@vortan.devDavid Rubin <david@vortan.dev> 2025-02-25 11:22:33-08:00
log44d3b5a6e47c0caa3b5b3fe998ad52ef1d83e032
treed9d6ee9fd7086701442ab7270e386c706e923ac3
parent35b9db3b1549668c5a3a464f97aed1441b18d791

build: add comments explaining why we disable ubsan


6 files changed, 14 insertions(+), 1 deletions(-)

test/link/glibc_compat/build.zig+6
......@@ -22,6 +22,8 @@ pub fn build(b: *std.Build) void {
2222 .link_libc = true,
2323 }),
2424 });
25 // We disable UBSAN for these tests as the libc being tested here is
26 // so old, it doesn't even support compiling our UBSAN implementation.
2527 exe.bundle_ubsan_rt = false;
2628 exe.root_module.sanitize_c = false;
2729 exe.root_module.addCSourceFile(.{ .file = b.path("main.c") });
......@@ -64,6 +66,8 @@ pub fn build(b: *std.Build) void {
6466 .link_libc = true,
6567 }),
6668 });
69 // We disable UBSAN for these tests as the libc being tested here is
70 // so old, it doesn't even support compiling our UBSAN implementation.
6771 exe.bundle_ubsan_rt = false;
6872 exe.root_module.sanitize_c = false;
6973 exe.root_module.addCSourceFile(.{ .file = b.path("glibc_runtime_check.c") });
......@@ -165,6 +169,8 @@ pub fn build(b: *std.Build) void {
165169 .link_libc = true,
166170 }),
167171 });
172 // We disable UBSAN for these tests as the libc being tested here is
173 // so old, it doesn't even support compiling our UBSAN implementation.
168174 exe.bundle_ubsan_rt = false;
169175 exe.root_module.sanitize_c = false;
170176
test/link/wasm/export-data/build.zig+1
......@@ -13,6 +13,7 @@ pub fn build(b: *std.Build) void {
1313 }),
1414 });
1515 lib.entry = .disabled;
16 // Disabling due to self-hosted wasm linker bug.
1617 lib.bundle_ubsan_rt = false;
1718 lib.use_lld = false;
1819 lib.root_module.export_symbol_names = &.{ "foo", "bar" };
test/link/wasm/export/build.zig+3-1
......@@ -19,6 +19,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
1919 no_export.entry = .disabled;
2020 no_export.use_llvm = false;
2121 no_export.use_lld = false;
22 // Don't pull in ubsan, since we're just expecting a very minimal executable.
2223 no_export.bundle_ubsan_rt = false;
2324
2425 const dynamic_export = b.addExecutable(.{
......@@ -33,7 +34,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
3334 dynamic_export.rdynamic = true;
3435 dynamic_export.use_llvm = false;
3536 dynamic_export.use_lld = false;
36 // don't pull in ubsan, since we're just expecting a minimal executable
37 // Don't pull in ubsan, since we're just expecting a very minimal executable.
3738 dynamic_export.bundle_ubsan_rt = false;
3839
3940 const force_export = b.addExecutable(.{
......@@ -48,6 +49,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
4849 force_export.root_module.export_symbol_names = &.{"foo"};
4950 force_export.use_llvm = false;
5051 force_export.use_lld = false;
52 // Don't pull in ubsan, since we're just expecting a very minimal executable.
5153 force_export.bundle_ubsan_rt = false;
5254
5355 const check_no_export = no_export.checkObject();
test/link/wasm/function-table/build.zig+2
......@@ -21,6 +21,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
2121 export_table.use_lld = false;
2222 export_table.export_table = true;
2323 export_table.link_gc_sections = false;
24 // Don't pull in ubsan, since we're just expecting a very minimal executable.
2425 export_table.bundle_ubsan_rt = false;
2526
2627 const regular_table = b.addExecutable(.{
......@@ -35,6 +36,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
3536 regular_table.use_llvm = false;
3637 regular_table.use_lld = false;
3738 regular_table.link_gc_sections = false; // Ensure function table is not empty
39 // Don't pull in ubsan, since we're just expecting a very minimal executable.
3840 regular_table.bundle_ubsan_rt = false;
3941
4042 const check_export = export_table.checkObject();
test/link/wasm/shared-memory/build.zig+1
......@@ -31,6 +31,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize_mode: std.builtin.Opt
3131 exe.shared_memory = true;
3232 exe.max_memory = 67108864;
3333 exe.root_module.export_symbol_names = &.{"foo"};
34 // Don't pull in ubsan, since we're just expecting a very minimal executable.
3435 exe.bundle_ubsan_rt = false;
3536
3637 const check_exe = exe.checkObject();
test/link/wasm/type/build.zig+1
......@@ -21,6 +21,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
2121 exe.use_llvm = false;
2222 exe.use_lld = false;
2323 exe.root_module.export_symbol_names = &.{"foo"};
24 // Don't pull in ubsan, since we're just expecting a very minimal executable.
2425 exe.bundle_ubsan_rt = false;
2526 b.installArtifact(exe);
2627