authorgravatar for david@vortan.devDavid Rubin <david@vortan.dev> 2025-01-13 21:27:24-08:00
committergravatar for david@vortan.devDavid Rubin <david@vortan.dev> 2025-02-25 11:22:33-08:00
log35b9db3b1549668c5a3a464f97aed1441b18d791
tree446b9a52420255c82adad39a9d1eb150ae7dfc1b
parent931178494f4c77631e5eb9c567f64492d6592eeb

correct some bugs


11 files changed, 195 insertions(+), 60 deletions(-)

lib/ubsan_rt.zig+151-27
......@@ -79,12 +79,16 @@ const Value = extern struct {
7979 };
8080 }
8181
82 fn getFloat(value: Value) c_longdouble {
82 fn getFloat(value: Value) f128 {
8383 assert(value.td.kind == .float);
8484 const size = value.td.info.float;
8585 const max_inline_size = @bitSizeOf(ValueHandle);
8686 if (size <= max_inline_size) {
87 return @bitCast(@intFromPtr(value.handle));
87 return @as(switch (@bitSizeOf(usize)) {
88 32 => f32,
89 64 => f64,
90 else => @compileError("unsupported target"),
91 }, @bitCast(@intFromPtr(value.handle)));
8892 }
8993 return @floatCast(switch (size) {
9094 64 => @as(*const f64, @alignCast(@ptrCast(value.handle))).*,
......@@ -122,6 +126,11 @@ const Value = extern struct {
122126 ) !void {
123127 comptime assert(fmt.len == 0);
124128
129 if (builtin.zig_backend == .stage2_x86_64 and builtin.os.tag == .windows) {
130 try writer.writeAll("(unknown)");
131 return;
132 }
133
125134 switch (value.td.kind) {
126135 .integer => {
127136 if (value.td.isSigned()) {
......@@ -146,6 +155,14 @@ fn overflowHandler(
146155 comptime operator: []const u8,
147156) void {
148157 const S = struct {
158 fn abort(
159 data: *const OverflowData,
160 lhs_handle: ValueHandle,
161 rhs_handle: ValueHandle,
162 ) callconv(.c) noreturn {
163 handler(data, lhs_handle, rhs_handle);
164 }
165
149166 fn handler(
150167 data: *const OverflowData,
151168 lhs_handle: ValueHandle,
......@@ -167,7 +184,14 @@ fn overflowHandler(
167184 }
168185 };
169186
170 exportHandler(&S.handler, sym_name, true);
187 exportHandlerWithAbort(&S.handler, &S.abort, sym_name);
188}
189
190fn negationHandlerAbort(
191 data: *const OverflowData,
192 value_handle: ValueHandle,
193) callconv(.c) noreturn {
194 negationHandler(data, value_handle);
171195}
172196
173197fn negationHandler(
......@@ -181,6 +205,14 @@ fn negationHandler(
181205 );
182206}
183207
208fn divRemHandlerAbort(
209 data: *const OverflowData,
210 lhs_handle: ValueHandle,
211 rhs_handle: ValueHandle,
212) callconv(.c) noreturn {
213 divRemHandler(data, lhs_handle, rhs_handle);
214}
215
184216fn divRemHandler(
185217 data: *const OverflowData,
186218 lhs_handle: ValueHandle,
......@@ -203,6 +235,20 @@ const AlignmentAssumptionData = extern struct {
203235 td: *const TypeDescriptor,
204236};
205237
238fn alignmentAssumptionHandlerAbort(
239 data: *const AlignmentAssumptionData,
240 pointer: ValueHandle,
241 alignment_handle: ValueHandle,
242 maybe_offset: ?ValueHandle,
243) callconv(.c) noreturn {
244 alignmentAssumptionHandler(
245 data,
246 pointer,
247 alignment_handle,
248 maybe_offset,
249 );
250}
251
206252fn alignmentAssumptionHandler(
207253 data: *const AlignmentAssumptionData,
208254 pointer: ValueHandle,
......@@ -248,6 +294,14 @@ const ShiftOobData = extern struct {
248294 rhs_type: *const TypeDescriptor,
249295};
250296
297fn shiftOobAbort(
298 data: *const ShiftOobData,
299 lhs_handle: ValueHandle,
300 rhs_handle: ValueHandle,
301) callconv(.c) noreturn {
302 shiftOob(data, lhs_handle, rhs_handle);
303}
304
251305fn shiftOob(
252306 data: *const ShiftOobData,
253307 lhs_handle: ValueHandle,
......@@ -285,7 +339,17 @@ const OutOfBoundsData = extern struct {
285339 index_type: *const TypeDescriptor,
286340};
287341
288fn outOfBounds(data: *const OutOfBoundsData, index_handle: ValueHandle) callconv(.c) noreturn {
342fn outOfBoundsAbort(
343 data: *const OutOfBoundsData,
344 index_handle: ValueHandle,
345) callconv(.c) noreturn {
346 outOfBounds(data, index_handle);
347}
348
349fn outOfBounds(
350 data: *const OutOfBoundsData,
351 index_handle: ValueHandle,
352) callconv(.c) noreturn {
289353 const index: Value = .{ .handle = index_handle, .td = data.index_type };
290354 logMessage(
291355 "index {} out of bounds for type {s}",
......@@ -297,6 +361,14 @@ const PointerOverflowData = extern struct {
297361 loc: SourceLocation,
298362};
299363
364fn pointerOverflowAbort(
365 data: *const PointerOverflowData,
366 base: usize,
367 result: usize,
368) callconv(.c) noreturn {
369 pointerOverflow(data, base, result);
370}
371
300372fn pointerOverflow(
301373 _: *const PointerOverflowData,
302374 base: usize,
......@@ -375,6 +447,13 @@ const TypeMismatchData = extern struct {
375447 },
376448};
377449
450fn typeMismatchAbort(
451 data: *const TypeMismatchData,
452 pointer: ?ValueHandle,
453) callconv(.c) noreturn {
454 typeMismatch(data, pointer);
455}
456
378457fn typeMismatch(
379458 data: *const TypeMismatchData,
380459 pointer: ?ValueHandle,
......@@ -416,6 +495,9 @@ const NonNullReturnData = extern struct {
416495 attribute_loc: SourceLocation,
417496};
418497
498fn nonNullReturnAbort(data: *const NonNullReturnData) callconv(.c) noreturn {
499 nonNullReturn(data);
500}
419501fn nonNullReturn(_: *const NonNullReturnData) callconv(.c) noreturn {
420502 logMessage("null pointer returned from function declared to never return null", .{});
421503}
......@@ -426,6 +508,10 @@ const NonNullArgData = extern struct {
426508 arg_index: i32,
427509};
428510
511fn nonNullArgAbort(data: *const NonNullArgData) callconv(.c) noreturn {
512 nonNullArg(data);
513}
514
429515fn nonNullArg(data: *const NonNullArgData) callconv(.c) noreturn {
430516 logMessage(
431517 "null pointer passed as argument {}, which is declared to never be null",
......@@ -438,6 +524,13 @@ const InvalidValueData = extern struct {
438524 td: *const TypeDescriptor,
439525};
440526
527fn loadInvalidValueAbort(
528 data: *const InvalidValueData,
529 value_handle: ValueHandle,
530) callconv(.c) noreturn {
531 loadInvalidValue(data, value_handle);
532}
533
441534fn loadInvalidValue(
442535 data: *const InvalidValueData,
443536 value_handle: ValueHandle,
......@@ -456,6 +549,9 @@ const InvalidBuiltinData = extern struct {
456549 clz,
457550 },
458551};
552fn invalidBuiltinAbort(data: *const InvalidBuiltinData) callconv(.c) noreturn {
553 invalidBuiltin(data);
554}
459555
460556fn invalidBuiltin(data: *const InvalidBuiltinData) callconv(.c) noreturn {
461557 logMessage(
......@@ -469,6 +565,13 @@ const VlaBoundNotPositive = extern struct {
469565 td: *const TypeDescriptor,
470566};
471567
568fn vlaBoundNotPositiveAbort(
569 data: *const VlaBoundNotPositive,
570 bound_handle: ValueHandle,
571) callconv(.c) noreturn {
572 vlaBoundNotPositive(data, bound_handle);
573}
574
472575fn vlaBoundNotPositive(
473576 data: *const VlaBoundNotPositive,
474577 bound_handle: ValueHandle,
......@@ -491,6 +594,13 @@ const FloatCastOverflowDataV2 = extern struct {
491594 to: *const TypeDescriptor,
492595};
493596
597fn floatCastOverflowAbort(
598 data_handle: *align(8) const anyopaque,
599 from_handle: ValueHandle,
600) callconv(.c) noreturn {
601 floatCastOverflow(data_handle, from_handle);
602}
603
494604fn floatCastOverflow(
495605 data_handle: *align(8) const anyopaque,
496606 from_handle: ValueHandle,
......@@ -514,22 +624,31 @@ fn floatCastOverflow(
514624}
515625
516626inline fn logMessage(comptime fmt: []const u8, args: anytype) noreturn {
517 std.debug.panicExtra(null, @returnAddress(), fmt, args);
627 std.debug.panicExtra(@returnAddress(), fmt, args);
518628}
519629
520630fn exportHandler(
521631 handler: anytype,
522632 comptime sym_name: []const u8,
523 comptime abort: bool,
524633) void {
525 const linkage = if (builtin.is_test) .internal else .weak;
634 const linkage = if (builtin.zig_backend == .stage2_x86_64 and builtin.os.tag == .windows) .internal else .weak;
635 const N = "__ubsan_handle_" ++ sym_name;
636 @export(handler, .{ .name = N, .linkage = linkage });
637}
638
639fn exportHandlerWithAbort(
640 handler: anytype,
641 abort_handler: anytype,
642 comptime sym_name: []const u8,
643) void {
644 const linkage = if (builtin.zig_backend == .stage2_x86_64 and builtin.os.tag == .windows) .internal else .weak;
526645 {
527646 const N = "__ubsan_handle_" ++ sym_name;
528647 @export(handler, .{ .name = N, .linkage = linkage });
529648 }
530 if (abort) {
649 {
531650 const N = "__ubsan_handle_" ++ sym_name ++ "_abort";
532 @export(handler, .{ .name = N, .linkage = linkage });
651 @export(abort_handler, .{ .name = N, .linkage = linkage });
533652 }
534653}
535654
......@@ -539,24 +658,29 @@ const can_build_ubsan = switch (builtin.zig_backend) {
539658};
540659
541660comptime {
542 overflowHandler("add_overflow", "+");
543 overflowHandler("mul_overflow", "*");
544 overflowHandler("sub_overflow", "-");
545 exportHandler(&alignmentAssumptionHandler, "alignment_assumption", true);
546 exportHandler(&builtinUnreachable, "builtin_unreachable", false);
547 exportHandler(&divRemHandler, "divrem_overflow", true);
548 exportHandler(&floatCastOverflow, "float_cast_overflow", true);
549 exportHandler(&invalidBuiltin, "invalid_builtin", true);
550 exportHandler(&loadInvalidValue, "load_invalid_value", true);
551 exportHandler(&missingReturn, "missing_return", false);
552 exportHandler(&negationHandler, "negate_overflow", true);
553 exportHandler(&nonNullArg, "nonnull_arg", true);
554 exportHandler(&nonNullReturn, "nonnull_return_v1", true);
555 exportHandler(&outOfBounds, "out_of_bounds", true);
556 exportHandler(&pointerOverflow, "pointer_overflow", true);
557 exportHandler(&shiftOob, "shift_out_of_bounds", true);
558 exportHandler(&typeMismatch, "type_mismatch_v1", true);
559 exportHandler(&vlaBoundNotPositive, "vla_bound_not_positive", true);
661 if (can_build_ubsan) {
662 overflowHandler("add_overflow", "+");
663 overflowHandler("mul_overflow", "*");
664 overflowHandler("sub_overflow", "-");
665 exportHandlerWithAbort(&alignmentAssumptionHandler, &alignmentAssumptionHandlerAbort, "alignment_assumption");
666
667 exportHandlerWithAbort(&divRemHandler, &divRemHandlerAbort, "divrem_overflow");
668 exportHandlerWithAbort(&floatCastOverflow, &floatCastOverflowAbort, "float_cast_overflow");
669 exportHandlerWithAbort(&invalidBuiltin, &invalidBuiltinAbort, "invalid_builtin");
670 exportHandlerWithAbort(&loadInvalidValue, &loadInvalidValueAbort, "load_invalid_value");
671
672 exportHandlerWithAbort(&negationHandler, &negationHandlerAbort, "negate_overflow");
673 exportHandlerWithAbort(&nonNullArg, &nonNullArgAbort, "nonnull_arg");
674 exportHandlerWithAbort(&nonNullReturn, &nonNullReturnAbort, "nonnull_return_v1");
675 exportHandlerWithAbort(&outOfBounds, &outOfBoundsAbort, "out_of_bounds");
676 exportHandlerWithAbort(&pointerOverflow, &pointerOverflowAbort, "pointer_overflow");
677 exportHandlerWithAbort(&shiftOob, &shiftOobAbort, "shift_out_of_bounds");
678 exportHandlerWithAbort(&typeMismatch, &typeMismatchAbort, "type_mismatch_v1");
679 exportHandlerWithAbort(&vlaBoundNotPositive, &vlaBoundNotPositiveAbort, "vla_bound_not_positive");
680
681 exportHandler(&builtinUnreachable, "builtin_unreachable");
682 exportHandler(&missingReturn, "missing_return");
683 }
560684
561685 // these checks are nearly impossible to duplicate in zig, as they rely on nuances
562686 // in the Itanium C++ ABI.
src/Compilation.zig+23-33
......@@ -1317,15 +1317,6 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
13171317 break :s .obj;
13181318 };
13191319
1320 const ubsan_rt_strat: RtStrat = s: {
1321 const want_ubsan_rt = options.want_ubsan_rt orelse (any_sanitize_c and output_mode != .Obj);
1322 if (!want_ubsan_rt) break :s .none;
1323 if (options.skip_linker_dependencies) break :s .none;
1324 if (have_zcu) break :s .zcu;
1325 if (is_exe_or_dyn_lib) break :s .lib;
1326 break :s .obj;
1327 };
1328
13291320 if (compiler_rt_strat == .zcu) {
13301321 // For objects, this mechanism relies on essentially `_ = @import("compiler-rt");`
13311322 // injected into the object.
......@@ -1355,6 +1346,15 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
13551346 // unlike compiler_rt, we always want to go through the `_ = @import("ubsan-rt")`
13561347 // approach, since the ubsan runtime uses quite a lot of the standard library
13571348 // and this reduces unnecessary bloat.
1349 const ubsan_rt_strat: RtStrat = s: {
1350 const want_ubsan_rt = options.want_ubsan_rt orelse (any_sanitize_c and output_mode != .Obj);
1351 if (!want_ubsan_rt) break :s .none;
1352 if (options.skip_linker_dependencies) break :s .none;
1353 if (have_zcu) break :s .zcu;
1354 if (is_exe_or_dyn_lib) break :s .lib;
1355 break :s .obj;
1356 };
1357
13581358 if (ubsan_rt_strat == .zcu) {
13591359 const ubsan_rt_mod = try Package.Module.create(arena, .{
13601360 .global_cache_directory = options.global_cache_directory,
......@@ -1362,7 +1362,7 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
13621362 .root = .{
13631363 .root_dir = options.zig_lib_directory,
13641364 },
1365 .root_src_path = "ubsan.zig",
1365 .root_src_path = "ubsan_rt.zig",
13661366 },
13671367 .fully_qualified_name = "ubsan_rt",
13681368 .cc_argv = &.{},
......@@ -1925,25 +1925,8 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
19251925 comp.remaining_prelink_tasks += 1;
19261926 }
19271927
1928<<<<<<< HEAD
1929 if (comp.include_compiler_rt and capable_of_building_compiler_rt) {
1930 if (is_exe_or_dyn_lib) {
1931=======
1932 if (target.isMinGW() and comp.config.any_non_single_threaded) {
1933 // LLD might drop some symbols as unused during LTO and GCing, therefore,
1934 // we force mark them for resolution here.
1935
1936 const tls_index_sym = switch (target.cpu.arch) {
1937 .x86 => "__tls_index",
1938 else => "_tls_index",
1939 };
1940
1941 try comp.force_undefined_symbols.put(comp.gpa, tls_index_sym, {});
1942 }
1943
19441928 if (capable_of_building_compiler_rt) {
19451929 if (comp.compiler_rt_strat == .lib) {
1946>>>>>>> 050e3e69ac (Compilation: correct when to include ubsan)
19471930 log.debug("queuing a job to build compiler_rt_lib", .{});
19481931 comp.queued_jobs.compiler_rt_lib = true;
19491932 comp.remaining_prelink_tasks += 1;
......@@ -1957,11 +1940,11 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
19571940
19581941 if (comp.ubsan_rt_strat == .lib) {
19591942 log.debug("queuing a job to build ubsan_rt_lib", .{});
1960 comp.job_queued_ubsan_rt_lib = true;
1943 comp.queued_jobs.ubsan_rt_lib = true;
19611944 comp.remaining_prelink_tasks += 1;
19621945 } else if (comp.ubsan_rt_strat == .obj) {
19631946 log.debug("queuing a job to build ubsan_rt_obj", .{});
1964 comp.job_queued_ubsan_rt_obj = true;
1947 comp.queued_jobs.ubsan_rt_obj = true;
19651948 comp.remaining_prelink_tasks += 1;
19661949 }
19671950
......@@ -3782,11 +3765,11 @@ fn performAllTheWorkInner(
37823765 }
37833766
37843767 if (comp.queued_jobs.ubsan_rt_lib and comp.ubsan_rt_lib == null) {
3785 comp.link_task_wait_group.spawnManager(buildRt, .{ comp, "ubsan_rt.zig", .libubsan, .Lib, &comp.ubsan_rt_lib, main_progress_node });
3768 comp.link_task_wait_group.spawnManager(buildRt, .{ comp, "ubsan_rt.zig", .libubsan, .Lib, false, &comp.ubsan_rt_lib, main_progress_node });
37863769 }
37873770
37883771 if (comp.queued_jobs.ubsan_rt_obj and comp.ubsan_rt_obj == null) {
3789 comp.link_task_wait_group.spawnManager(buildRt, .{ comp, "ubsan_rt.zig", .libubsan, .Obj, &comp.ubsan_rt_obj, main_progress_node });
3772 comp.link_task_wait_group.spawnManager(buildRt, .{ comp, "ubsan_rt.zig", .libubsan, .Obj, false, &comp.ubsan_rt_obj, main_progress_node });
37903773 }
37913774
37923775 if (comp.queued_jobs.glibc_shared_objects) {
......@@ -6037,9 +6020,16 @@ pub fn addCCArgs(
60376020 try argv.append("-fno-sanitize=function");
60386021
60396022 // It's recommended to use the minimal runtime in production environments
6040 // due to the security implications of the full runtime.
6023 // due to the security implications of the full runtime. The minimal runtime
6024 // doesn't provide much benefit over simply trapping.
60416025 if (mod.optimize_mode == .ReleaseSafe) {
6042 try argv.append("-fsanitize-minimal-runtime");
6026 try argv.append("-fsanitize-trap=undefined");
6027 }
6028
6029 // This is necessary because, by default, Clang instructs LLVM to embed a COFF link
6030 // dependency on `libclang_rt.ubsan_standalone.a` when the UBSan runtime is used.
6031 if (target.os.tag == .windows) {
6032 try argv.append("-fno-rtlib-defaultlib");
60436033 }
60446034 }
60456035 }
test/link/elf.zig+4
......@@ -2049,6 +2049,8 @@ fn testLargeBss(b: *Build, opts: Options) *Step {
20492049 \\}
20502050 , &.{});
20512051 exe.linkLibC();
2052 // Disabled to work around an ELF linker bug.
2053 exe.root_module.sanitize_c = false;
20522054
20532055 const run = addRunArtifact(exe);
20542056 run.expectExitCode(0);
......@@ -3552,6 +3554,8 @@ fn testTlsLargeTbss(b: *Build, opts: Options) *Step {
35523554 \\}
35533555 , &.{});
35543556 exe.linkLibC();
3557 // Disabled to work around an ELF linker bug.
3558 exe.root_module.sanitize_c = false;
35553559
35563560 const run = addRunArtifact(exe);
35573561 run.expectStdOutEqual("3 0 5 0 0 0\n");
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 exe.bundle_ubsan_rt = false;
26 exe.root_module.sanitize_c = false;
2527 exe.root_module.addCSourceFile(.{ .file = b.path("main.c") });
2628 // TODO: actually test the output
2729 _ = exe.getEmittedBin();
......@@ -62,6 +64,8 @@ pub fn build(b: *std.Build) void {
6264 .link_libc = true,
6365 }),
6466 });
67 exe.bundle_ubsan_rt = false;
68 exe.root_module.sanitize_c = false;
6569 exe.root_module.addCSourceFile(.{ .file = b.path("glibc_runtime_check.c") });
6670
6771 // Only try running the test if the host glibc is known to be good enough. Ideally, the Zig
......@@ -161,6 +165,8 @@ pub fn build(b: *std.Build) void {
161165 .link_libc = true,
162166 }),
163167 });
168 exe.bundle_ubsan_rt = false;
169 exe.root_module.sanitize_c = false;
164170
165171 // Only try running the test if the host glibc is known to be good enough. Ideally, the Zig
166172 // test runner would be able to check this, but see https://github.com/ziglang/zig/pull/17702#issuecomment-1831310453
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 lib.bundle_ubsan_rt = false;
1617 lib.use_lld = false;
1718 lib.root_module.export_symbol_names = &.{ "foo", "bar" };
1819 // Object being linked has neither functions nor globals named "foo" or "bar" and
test/link/wasm/export/build.zig+4
......@@ -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 no_export.bundle_ubsan_rt = false;
2223
2324 const dynamic_export = b.addExecutable(.{
2425 .name = "dynamic",
......@@ -32,6 +33,8 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
3233 dynamic_export.rdynamic = true;
3334 dynamic_export.use_llvm = false;
3435 dynamic_export.use_lld = false;
36 // don't pull in ubsan, since we're just expecting a minimal executable
37 dynamic_export.bundle_ubsan_rt = false;
3538
3639 const force_export = b.addExecutable(.{
3740 .name = "force",
......@@ -45,6 +48,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
4548 force_export.root_module.export_symbol_names = &.{"foo"};
4649 force_export.use_llvm = false;
4750 force_export.use_lld = false;
51 force_export.bundle_ubsan_rt = false;
4852
4953 const check_no_export = no_export.checkObject();
5054 check_no_export.checkInHeaders();
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 export_table.bundle_ubsan_rt = false;
2425
2526 const regular_table = b.addExecutable(.{
2627 .name = "regular_table",
......@@ -34,6 +35,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
3435 regular_table.use_llvm = false;
3536 regular_table.use_lld = false;
3637 regular_table.link_gc_sections = false; // Ensure function table is not empty
38 regular_table.bundle_ubsan_rt = false;
3739
3840 const check_export = export_table.checkObject();
3941 const check_regular = regular_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 exe.bundle_ubsan_rt = false;
3435
3536 const check_exe = exe.checkObject();
3637
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 exe.bundle_ubsan_rt = false;
2425 b.installArtifact(exe);
2526
2627 const check_exe = exe.checkObject();
test/src/StackTrace.zig+1
......@@ -81,6 +81,7 @@ fn addExpect(
8181 }),
8282 .use_llvm = use_llvm,
8383 });
84 exe.bundle_ubsan_rt = false;
8485
8586 const run = b.addRunArtifact(exe);
8687 run.removeEnvironmentVariable("CLICOLOR_FORCE");
tools/incr-check.zig+1
......@@ -108,6 +108,7 @@ pub fn main() !void {
108108 "build-exe",
109109 case.root_source_file,
110110 "-fincremental",
111 "-fno-ubsan-rt",
111112 "-target",
112113 target.query,
113114 "--cache-dir",