37820 Commits

Author SHA1 Message Date
Ryan Liptak 7056ba9a5c Fetch: Fix zip fetching when cache directory doesn't have tmp dir
Fixes #31964
2026-04-21 21:00:52 +02:00
Andrew Kelley 92517c04c7 Merge pull request 'package fetching fixes and enhancements' (#31992) from fetch-enhancements into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31992
2026-04-21 21:00:46 +02:00
Frank Denis 58ea88f6cf crypto.asn1.Oid: Reject empty OID encodings (#31983)
The DER decoder accepted zero-length OID payloads producing an Oid value that would panic later.

Co-authored-by: Frank Denis <github@pureftpd.org>
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31983
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
Co-authored-by: Frank Denis <jedisct1@noreply.codeberg.org>
Co-committed-by: Frank Denis <jedisct1@noreply.codeberg.org>
2026-04-20 22:40:17 +02:00
Andrew Kelley aeff0efafc Merge pull request 'std.Io.Dir: fix incorrect return types in setFileOwner and setTimestampsNow' (#31940) from lukasl/zig:fix-dir-setfileowner-error-type into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31940
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-04-20 22:39:57 +02:00
Andrew Kelley cf65d4f080 Merge pull request 'Fix uefi (un)installMultipleProtocolInterfaces' (#31934) from mrosowski/zig:uefi-fix-install-multiple into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31934
Reviewed-by: linus <mail@linusgroh.de>
2026-04-20 22:39:46 +02:00
Frank Denis 2259ed213b Merge pull request 'tls.Client: reject empty TLS 1.3 inner plaintext and short records' (#31972) from jedisct1/zig:empty-plaintext-underflows-content-type-parsing into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31972
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-04-20 22:39:36 +02:00
Frank Denis 58f5be45f4 Merge pull request 'io: make toClock compile' (#31966) from sinon/zig:fix-io-clock into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31966
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-04-20 22:38:38 +02:00
Frank Denis bafad9644c std.crypto.Certificate: fix UTCTime year interpretation
UTCTime years in the range 50-99 must map to 1950-1999, but the
parser unconditionally added 2000, producing dates 100 years in the
future.

This caused verify() to accept certificates whose validity actually
expired decades ago.

Change that to match what OpenSSL, BoringSSL, etc. do
2026-04-20 22:37:42 +02:00
Alex Kladov 97943b9a62 fuzz: don't err if .zig-cache/tmp doesn't exist
If we have just created cache_dir_path, then there's no `tmp` dir
there, and

    cache_dir.createFile(io, "tmp/libfuzzer.log", .{ .truncate = false })

fails.

Tested via

    $ zig version
    0.16.0
    $ zig build --zig-lib-dir ~/p/zig/lib/ --fuzz
2026-04-20 01:59:20 +02:00
Andrew Kelley cf0ce50783 langref: use the word "namespace" instead of "container" 2026-04-20 01:59:20 +02:00
Sage Hane c9a761348c langref: Clear up terminology used for top-level doc comments 2026-04-20 01:59:20 +02:00
Andrew Kelley 9a0713db3c bootstrap.c: correct the zig1 version number
this should have been part of the "start the release cycle" commit.
2026-04-19 11:27:47 -07:00
Alex Rønne Petersen 2ee80a8a8d Revert "Make *24 and *48 extern-compatible for ez80"
This reverts commit 12d0d39223.

ez80 support is not in 0.16.0.
2026-04-17 23:01:39 +02:00
Linus Groh 3f5305bab7 std.c: Fix serenity's futex() declaration
Two mistakes I made when translating from the C header:

- The timeout and userspace_address2 pointers should be nullable.
- futex_wait() and futex_wake() are defined as static functions and
  therefore not available as exported symbols. They're just thin
  wrappers around futex() anyway so that's fine.
2026-04-17 22:56:03 +02:00
Andrew Kelley cfee713857 Merge pull request 'Haiku fixes' (#31851) from ypsvlq/zig:master into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31851
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-04-17 22:55:22 +02:00
Sam Connelly 12d0d39223 Make *24 and *48 extern-compatible for ez80 2026-04-17 22:43:07 +02:00
Linus Groh ac9bbe4b37 std.Io.Threaded: serenity does not have wait4 2026-04-17 22:43:00 +02:00
Alex Rønne Petersen e2d0ed235e cbe: don't emit zig_no_builtin on every function with -fno-builtin 2026-04-16 21:48:30 +02:00
zacoons 176112558f std.sort: clarify description of equalRange 2026-04-16 21:47:49 +02:00
Andrew Kelley 50423dfa0b std.Io.Writer.print: fix wrong fn signature in docs
closes #25963
2026-04-16 21:47:45 +02:00
Matthew Lugg f24b0bc4dd llvm: workaround crash on large inline memset
See https://codeberg.org/ziglang/zig/issues/31701 for details. I am not
re-enabling the disabled compiler-rt module tests here because they are
also affected by https://codeberg.org/ziglang/zig/issues/31702.
2026-04-16 16:01:45 +01:00
Matthew Lugg 5492b1e326 tests: move incremental target matrix out of manifests
Having the matrix of test targets for incremental compilation in the
individual test manifests has turned out to be inconvenient for a few
reasons: the tests are almost certain to accidentally get out of sync,
disabling targets entirely is annoying to do, and incr-check needs to
take care to print the target in all error messages (which currently
does not always happen).

If I recall correctly, I originally designed it this way because it
allows targets to be disabled at the granularity of individual tests,
but there's an easier approach to that: just let a test manifest that it
should be *skipped* on a certain target! As skipping is the rare case,
and also the case you want readers to notice, it makes sense for *it* to
be explicitly specified, like how unit tests use `error.SkipZigTest`.

So, `incr-check` no longer runs through a list of targets specified in
the manifest. Instead, it accepts (and, in fact, requires) a single
target on the command line, and runs the test for that specific target.
If the file contains a `#skip_target` directive for that target, then
`incr-check` exits immediately, so we can still disable targets at
individual test granularity, but you can also disable a target for all
tests by just commenting it out of the matrix in `test/tests.zig`.

As a nice bonus, this also allows the build system to run different
incremental test targets in parallel, because the targets are now
different steps.

This definitely seems like a better way to split the work between the
build system and incr-check---sorry for getting this wrong initially!
2026-04-16 12:37:08 +02:00
Alex Rønne Petersen bde87cfc71 Merge pull request 'compiler: disable warnings in all vendored code' (#31868) from alexrp/zig:disable-vendor-warnings into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31868
2026-04-16 12:35:18 +02:00
Carl Åstholm 2eda0ef8f0 Correct std.os.emscripten.W.STOPSIG return type 2026-04-16 12:34:49 +02:00
Alex Rønne Petersen 88b68e6815 compiler-rt: export __stack_chk_guard as __guard_local on OpenBSD
closes https://codeberg.org/ziglang/zig/issues/31867
2026-04-16 12:34:37 +02:00
Mason Remaley fb789d46e7 Fixes compiler error in fuzz tester due to stack trace and error trace separation 2026-04-16 12:34:32 +02:00
Andrew Kelley 2633fe27f2 std.Io.Writer.print: update doc comments
notably, removes incorrect mention of {D} format specifier
2026-04-16 12:34:15 +02:00
Matthew Lugg 73fcba1ef4 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 08:52:02 +01:00
Andrew Kelley 019395bd8b start the 0.16.1 release cycle 2026-04-13 11:20:59 -07:00
Andrew Kelley 24fdd5b7a4 Release 0.16.0 0.16.0 2026-04-13 11:19:17 -07: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
Andrew Kelley c457939f10 Merge pull request 'Parses inline callers when generating stack traces from PDBs' (#31814) from MasonRemaley/zig:pdb-backtrace-inlines into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31814
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-04-13 18:26:53 +02:00
rpkak 778f8d557b add cimport file to zcu.alive_files 2026-04-13 13:17:58 +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 9edbf00ddf Enables disabled error trace test on Windows 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 825ba5a350 Adds tests for inline traces 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