authorgravatar for sachabarsayuracko@gmail.comsquidy239 <sachabarsayuracko@gmail.com> 2026-03-20 19:58:33+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-03-20 19:58:33+01:00
log4c3877069dbf3476b15cea9258d164bda26e8385
tree8cff4cd0055737160f9d0ad671b9360db83d1d01
parent83c7aba12780333a832148684d055698a2914463

remove various workarounds for issues that are now fixed (#31567)

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31567 Reviewed-by: Andrew Kelley <andrew@ziglang.org> Co-authored-by: squidy239 <sachabarsayuracko@gmail.com> Co-committed-by: squidy239 <sachabarsayuracko@gmail.com>

11 files changed, 10 insertions(+), 36 deletions(-)

lib/compiler_rt/log.zig+1-2
......@@ -420,8 +420,7 @@ pub fn log(x: f64) callconv(.c) f64 {
420420 // maybe use fma as musl does
421421 const r = (z - tab2[i].chi - tab2[i].clo) * invc;
422422
423 // https://github.com/ziglang/zig/issues/18614
424 const kd: f64 = @floatFromInt(k);
423 const kd: f64 = k;
425424 const w = kd * 0x1.62e42fefa3800p-1 + logc;
426425 const hi = w + r;
427426 const lo = w - hi + r + kd * 0x1.ef35793c76730p-45;
lib/std/Io/Threaded/test.zig+2-12
......@@ -9,11 +9,6 @@ const assert = std.debug.assert;
99const windows = std.os.windows;
1010
1111test "concurrent vs main prevents deadlock via oversubscription" {
12 if (true) {
13 // https://codeberg.org/ziglang/zig/issues/30141
14 return error.SkipZigTest;
15 }
16
1712 var threaded: Io.Threaded = .init(std.testing.allocator, .{
1813 .argv0 = .empty,
1914 .environ = .empty,
......@@ -37,19 +32,14 @@ test "concurrent vs main prevents deadlock via oversubscription" {
3732}
3833
3934fn put(io: Io, queue: *Io.Queue(u8)) void {
40 queue.putOneUncancelable(io, 42);
35 queue.putOneUncancelable(io, 42) catch unreachable;
4136}
4237
4338fn get(io: Io, queue: *Io.Queue(u8)) void {
44 assert(queue.getOneUncancelable(io) == 42);
39 assert(queue.getOneUncancelable(io) catch unreachable == 42);
4540}
4641
4742test "concurrent vs concurrent prevents deadlock via oversubscription" {
48 if (true) {
49 // https://codeberg.org/ziglang/zig/issues/30141
50 return error.SkipZigTest;
51 }
52
5343 var threaded: Io.Threaded = .init(std.testing.allocator, .{
5444 .argv0 = .empty,
5545 .environ = .empty,
lib/std/heap.zig+1-4
......@@ -45,10 +45,7 @@ pub const MemoryPoolOptions = memory_pool.Options;
4545///
4646/// On many systems, the actual page size can only be determined at runtime
4747/// with `pageSize`.
48pub const page_size_min: usize = std.options.page_size_min orelse (page_size_min_default orelse 1);
49//`orelse 1` is a workaround for https://codeberg.org/ziglang/zig/issues/30842
50//@compileError(@tagName(builtin.cpu.arch) ++ "-" ++ @tagName(builtin.os.tag) ++ " has unknown page_size_min; populate std.options.page_size_min"));
51
48pub const page_size_min: usize = std.options.page_size_min orelse (page_size_min_default orelse @compileError(@tagName(builtin.cpu.arch) ++ "-" ++ @tagName(builtin.os.tag) ++ " has unknown page_size_min; populate std.options.page_size_min"));
5249/// comptime-known maximum page size of the target.
5350///
5451/// Targeting a system with a larger page size may require overriding
lib/std/meta.zig+1-2
......@@ -482,8 +482,7 @@ pub fn FieldEnum(comptime T: type) type {
482482}
483483
484484fn expectEqualEnum(expected: anytype, actual: @TypeOf(expected)) !void {
485 // TODO: https://github.com/ziglang/zig/issues/7419
486 // testing.expectEqual(@typeInfo(expected).@"enum", @typeInfo(actual).@"enum");
485 try testing.expectEqual(@typeInfo(expected).@"enum", @typeInfo(actual).@"enum");
487486 try testing.expectEqual(
488487 @typeInfo(expected).@"enum".tag_type,
489488 @typeInfo(actual).@"enum".tag_type,
src/link/Elf/Object.zig+1-2
......@@ -736,8 +736,7 @@ pub fn markImportsExports(self: *Object, elf_file: *Elf) void {
736736 const ref = self.resolveSymbol(@intCast(idx), elf_file);
737737 const sym = elf_file.symbol(ref) orelse continue;
738738 const file = sym.file(elf_file).?;
739 // https://github.com/ziglang/zig/issues/21678
740 if (@as(u16, @bitCast(sym.version_index)) == @as(u16, @bitCast(elf.Versym.LOCAL))) continue;
739 if (sym.version_index == elf.Versym.LOCAL) continue;
741740 const vis: elf.STV = @enumFromInt(@as(u3, @truncate(sym.elfSym(elf_file).st_other)));
742741 if (vis == .HIDDEN) continue;
743742 if (file == .shared_object and !sym.isAbs(elf_file)) {
src/link/Elf/SharedObject.zig+1-3
......@@ -281,9 +281,7 @@ pub fn parse(
281281 else
282282 .{ .VERSION = versyms[i].VERSION, .HIDDEN = false };
283283
284 // https://github.com/ziglang/zig/issues/21678
285 //if (ver == .LOCAL) continue;
286 if (@as(u16, @bitCast(ver)) == 0) continue;
284 if (ver == elf.Versym.LOCAL) continue;
287285
288286 try nonlocal_esyms.ensureUnusedCapacity(gpa, 1);
289287 try nonlocal_versyms.ensureUnusedCapacity(gpa, 1);
src/link/Elf/ZigObject.zig+1-2
......@@ -693,8 +693,7 @@ pub fn markImportsExports(self: *ZigObject, elf_file: *Elf) void {
693693 const ref = self.resolveSymbol(@intCast(i | global_symbol_bit), elf_file);
694694 const sym = elf_file.symbol(ref) orelse continue;
695695 const file = sym.file(elf_file).?;
696 // https://github.com/ziglang/zig/issues/21678
697 if (@as(u16, @bitCast(sym.version_index)) == @as(u16, @bitCast(elf.Versym.LOCAL))) continue;
696 if (sym.version_index == elf.Versym.LOCAL) continue;
698697 const vis: elf.STV = @enumFromInt(@as(u3, @truncate(sym.elfSym(elf_file).st_other)));
699698 if (vis == .HIDDEN) continue;
700699 if (file == .shared_object and !sym.isAbs(elf_file)) {
src/link/Elf/synthetic_sections.zig+1-2
......@@ -1372,8 +1372,7 @@ pub const VerneedSection = struct {
13721372
13731373 for (verneed.items[1..]) |ver| {
13741374 if (ver.shared_object == last.shared_object) {
1375 // https://github.com/ziglang/zig/issues/21678
1376 if (@as(u16, @bitCast(ver.version_index)) != @as(u16, @bitCast(last.version_index))) {
1375 if (ver.version_index != last.version_index) {
13771376 last_vernaux = try vern.addVernaux(last_verneed, ver.versionString(elf_file), elf_file);
13781377 }
13791378 } else {
test/behavior/atomics.zig-5
......@@ -217,11 +217,6 @@ test "atomicrmw with ints" {
217217 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
218218 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
219219
220 if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isMIPS()) {
221 // https://github.com/ziglang/zig/issues/16846
222 return error.SkipZigTest;
223 }
224
225220 try testAtomicRmwInts();
226221 try comptime testAtomicRmwInts();
227222}
test/behavior/prefetch.zig-1
......@@ -3,7 +3,6 @@ const std = @import("std");
33
44test "@prefetch()" {
55 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
6 if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/134624
76
87 var a: [2]u32 = .{ 42, 42 };
98 var a_len = a.len;
test/link/elf.zig+1-1
......@@ -74,7 +74,7 @@ pub fn testAll(b: *Build, build_opts: BuildOptions) *Step {
7474 elf_step.dependOn(testImageBase(b, .{ .target = musl_target }));
7575 elf_step.dependOn(testInitArrayOrder(b, .{ .target = musl_target }));
7676 elf_step.dependOn(testLargeAlignmentExe(b, .{ .target = musl_target }));
77 // https://github.com/ziglang/zig/issues/17449
77 // https://codeberg.org/ziglang/zig/issues/31580
7878 // elf_step.dependOn(testLargeBss(b, .{ .target = musl_target }));
7979 elf_step.dependOn(testLinkingC(b, .{ .target = musl_target }));
8080 elf_step.dependOn(testLinkingCpp(b, .{ .target = musl_target }));