15105 Commits

Author SHA1 Message Date
Alex Rønne Petersen 9125e24909 compiler-rt: disable some limb64 tests on some big-endian targets
https://codeberg.org/ziglang/zig/issues/31905
2026-04-16 17:46:29 +02:00
Alex Rønne Petersen cfa0ada9e1 Merge pull request 'std.os.linux: fix syscall argument width for mipsn32 and x32' (#31894) from alexrp/zig:mipsn32-x32-fixes into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31894
2026-04-16 16:08:04 +02:00
Alex Rønne Petersen 6315c1a190 std.os.linux: remove vfork()
It's a bad API with better alternatives on Linux, and is near-impossible to use
safely in Zig code.

closes https://codeberg.org/ziglang/zig/issues/31882
2026-04-16 16:00:21 +02:00
Alex Rønne Petersen 67023fc4bd std.os.linux: fix syscall argument width for mipsn32 and x32
This required a thorough audit of every syscall wrapper in std.os.linux, so
while I was here, I fixed some minor arch-specific bugs, improved some types,
simplified some casts, and deleted some dead code.

Note that lseek() in particular is still broken for n32 and x32 after this
commit; this wrapper will require some special-casing in the arch bits due to
its unusual return type width.

closes https://github.com/ziglang/zig/issues/22464
closes https://codeberg.org/ziglang/zig/issues/31597
2026-04-16 16:00:21 +02:00
Alex Rønne Petersen ab2f9ca503 std.os.linux: csky and xtensa also use aligned register pairs 2026-04-16 16:00:21 +02:00
Alex Rønne Petersen deb9b58cbc std.os.linux.loongarch32: remove a leftover FIXME comment 2026-04-16 16:00:21 +02:00
Alex Rønne Petersen e7ee61cd64 musl: fix syscall argument width for mipsn32
https://www.openwall.com/lists/musl/2026/04/16/1
2026-04-16 16:00:18 +02:00
mlugg d0226ac301 Merge pull request 'incremental: fix tracking of nested container declarations (and of opaque types)' (#31889) from dont-track-children-if-lost-parent into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31889
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-04-16 09:50:26 +02:00
rpkak f564a7733c remove code, which is only reached if c_longdouble is only 16 or 32 bits big 2026-04-16 07:05:31 +02:00
rpkak e74b98227e zigc: long double: call double function if long double and double are equivalent
For some of these functions and most targets this changes nothing,
either because long double and double are not equivalent or because
llvm did function deduplication.

But e.g. on aarch64-windows-gnu, ucrt provides hypot, but not hypotl.
Now hypotl calls hypot from ucrt instead of including the std.math.hypot
implementation in zigc.

Very trivial functions (like nanl) are not changed, because a function call would probably make this function more complex.
2026-04-16 07:05:30 +02:00
Andrew Kelley 67a5b6e5e8 delete @cImport from the language
closes #20630
2026-04-15 17:43:53 -07:00
Andrew Kelley 0dd99c37cc std.Io.Writer.print: update doc comments
notably, removes incorrect mention of {D} format specifier
2026-04-15 16:40:19 -07:00
badayvedat a05a25e2bb zig libc: export fdiml and fdimf (#31759)
Exports `fdiml` and `fdimf` in zig libc and removes from from musl and mingw libc.

Contributes to: https://codeberg.org/ziglang/zig/issues/30978

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31759
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
Co-authored-by: badayvedat <badayvedat@gmail.com>
Co-committed-by: badayvedat <badayvedat@gmail.com>
2026-04-16 01:11:04 +02:00
Matthew Lugg 6608b65100 incremental: fix tracking of nested container declarations
...but not in the way you'd expect. We were actually tracking them in
cases where we shouldn't have been! We cannot track a declaration if its
parent namespace has been lost, because that will cause analysis
failures immediately, but if we excluded a type from the mapping due to
a major change (such as a struct turning into a union, or a field being
added), we were still including any trackable instructions inside the
container's field expressions (e.g. struct field type expressions). This
meant we were tracking a type declaration while losing tracking on its
parent namespace, with predictably disastrous results.

Oh, also, tracking for opaque types was just totally wrong (I think this
was a typo from a while back). We could map it to things other than
opaque declarations, and we never mapped declarations inside opaques.
So, uh, I fixed that too.
2026-04-16 00:00:44 +01:00
Christophe Delage a999fc9059 Add @exp(f128) and @exp2(f128) 2026-04-16 00:55:54 +02:00
Andrew Kelley e00b5daa1f Merge pull request 'stage2-wasm: finish bigint support' (#31784) from pavelverigo/zig:wasm-bigint-finish into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31784
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-04-15 23:07:40 +02:00
Mason Remaley 5984d5dbde Fixes compiler error in fuzz tester due to stack trace and error trace separation 2026-04-15 22:52:57 +02:00
Alex Rønne Petersen 08850cfcb2 compiler-rt: export __stack_chk_guard as __guard_local on OpenBSD
closes https://codeberg.org/ziglang/zig/issues/31867
2026-04-15 16:22:54 +02:00
Carl Åstholm 046002d1a5 Correct std.os.emscripten.W.STOPSIG return type 2026-04-15 11:53:58 +02:00
Elaine Gibson 52c000c247 std.Io.Threaded: handle haiku syscall returns correctly 2026-04-14 20:44:00 +01:00
Elaine Gibson db63e4725a std.debug: fix handleSegfaultPosix for haiku 2026-04-14 19:10:21 +01:00
Elaine Gibson 7f71fe5bc7 std.c: fix definition of Sigaction for haiku 2026-04-14 19:10:05 +01:00
Elaine Gibson e8a683a0f9 std.Io.Threaded: implement dirReadHaiku 2026-04-14 19:00:57 +01:00
Elaine Gibson c94ea1ea2d std.Io.Threaded: haiku fixes 2026-04-14 12:04:41 +01:00
Elaine Gibson f0666586f6 std.c: add haiku readv_pos and write_pov 2026-04-14 12:04:41 +01:00
Elaine Gibson 90399b83e7 std.zig.LibCInstallation: fix findNativeGccDirHaiku 2026-04-14 12:04:41 +01:00
krystiann 8578b07faa std.os.linux: add arc arch bits 2026-04-14 12:51:44 +02:00
David Gonzalez Martin 37a20d3984 Allow the user to override unexpected error trace
This is the only bit left in the standard library where stack trace writing
code is pulled to the binary even if the user doesn't want it
2026-04-13 19:58:01 +02:00
Mason Remaley 6707a5efee Arena allocates text 2026-04-13 01:30:14 -07:00
Mason Remaley 4ad665d3c8 Writes symbols to array list argument 2026-04-12 23:50:24 -07:00
Mason Remaley e968e6d004 Fixes typos/out of date comments, switches to unstable sort 2026-04-12 14:09:22 -07:00
Mason Remaley df2413cf69 Removes dead code, updates some tests, fixes typos in comments, formats 2026-04-12 04:01:30 -07:00
Mason Remaley 312ef9558b Mitigation for bug that results in reuse of inlinee IDs when functions share names 2026-04-12 04:01:30 -07:00
Mason Remaley 541bd6c369 Updates more failing tests 2026-04-12 04:01:30 -07:00
Mason Remaley 87fb7df257 Updates stack trace vs error return trace in more places 2026-04-12 04:01:30 -07:00
Mason Remaley ac207073f3 Reverts renaming of builtin.StackTrace -> ErrorReturnTrace
We can defer this change until the next time zig1 needs to be updated
2026-04-12 04:01:30 -07:00
Mason Remaley cbd7f54f06 Use readers to simplify PDB parsing 2026-04-12 04:01:30 -07:00
Mason Remaley 334f40576e Cleans up some PDB parsing logic 2026-04-12 04:01:30 -07:00
Mason Remaley 4efbb27aa2 Don't bother resolving symbol names that won't be used
Also fixes some memory management issues
2026-04-12 04:01:30 -07:00
Mason Remaley f6a3a0ca72 Replaces the inline symbol iterator with an array of symbols
The intention behind the iterator was to avoid needing to allocate the
symbols, but in practice we need to allocate them anyway since we need
to reverse their order and don't have random access. The alternative
would be an N^2 algorithm.

In practice this isn't that bad, because even if the allocation fails,
we'll still end up printing the address, so the user still ends up with
the necessary information to reconstruct the crash. I don't think it's
worth it to try to set up some kind of ring buffer or return partial
results on failure, but may revisit this.
2026-04-12 04:01:30 -07:00
Mason Remaley 5a4b5c8b94 Uses dwarf iterator if dwarf symbols found for windows executable 2026-04-12 04:01:30 -07:00
Mason Remaley dcdb562c15 Adds support for running the trace tests through darling, fixes compilation errors in MachO due to interface change 2026-04-12 04:01:30 -07:00
Mason Remaley 492efd4c06 Adds support for running stack and error trace tests through Wine
Also fixes minor bug that was preventing existing tests from passing on
32 bit Windows
2026-04-12 04:01:30 -07:00
Mason Remaley c2cbb944ba Further improvements to stack trace type 2026-04-12 04:01:29 -07:00
Mason Remaley 6bf583c4ba Further separation of stack trace and error return trace 2026-04-12 04:01:29 -07:00
Mason Remaley 94ff38af87 Separates error return traces from stack traces
Doesn't commit the changes to stage1, we can generate those at the end
once we're not making any more changes to it to avoid wasting storage.
2026-04-12 04:01:29 -07:00
Mason Remaley cc15c8ae7e Cleans up binary annotation opcodes that we don't handle 2026-04-12 04:01:29 -07:00
Mason Remaley fa26ab6fa3 Cleans up handling of signed line deltas 2026-04-12 04:01:29 -07:00
Mason Remaley 094e841f09 Don't print column if column info is missing 2026-04-12 04:01:29 -07:00
Mason Remaley 7ec2f2b27d Cleans up, implements handling for the change file binary annotation 2026-04-12 04:01:29 -07:00