aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2025-08-14tsan: remove usage of libnvmm and libncurses headers on netbsdAlex Rønne Petersen
https://github.com/llvm/llvm-project/pull/153534
2025-08-14Linux: Use time64 syscalls when availableStephen Gregoratto
Newer 32-bit Linux targets like 32-bit RISC-V only use the 64-bit time ABI, with these syscalls having `time64` as their suffix. This is a stopgap solution in favor of a full audit of `std.os.linux` to prepare for #4726. See also #21440 for prior art.
2025-08-14Linux: Update syscall list for 6.16Stephen Gregoratto
The generic syscall table has different names for syscalls that take a timespec64 on 32-bit targets, in that it adds the `_time64` suffix. Similarly, the `_time32` suffix has been removed. I'm not sure if the existing logic for determining the proper timespec struct to use was subtly broken, but it should be a good chance to finish #4726 - we only have 12 years after all... As for the changes since 6.11..6.16: 6.11: - x86_64 gets `uretprobe`, a syscall to speed up returning BPF probes. - Hexagon gets `clone3`, but don't be fooled: it just returns ENOSYS. 6.13: - The `*xattr` family of syscalls have been enhanced with new `*xattrat` versions, similar to the other file-based `at` calls. 6.15: - Atomically create a detached mount tree and set mount options on it. Finally, this commit also adds the syscall numbers for OpenRISC and maps it to the `or1k` cpu.
2025-08-14Merge pull request #24825 from alexrp/freebsd-fixesAlex Rønne Petersen
2025-08-13build runner: fix single-threaded buildmlugg
Resolves: #24723
2025-08-13http: fix handling of limit in chunkedSendFileKendall Condon
`limit` in chunkedSendFile applies only to the file, not the entire chunk. `limit` in sendFileHeader does not include the header. Additionally adds a comment to clarify what `limit` applies to in sendFileHeader and fixed a small bug in it (`drain` is able to return less then `header.len`).
2025-08-13std.fs.File.Reader: fix seekByAndrew Kelley
Tested locally: stage3/bin/zig build test -Dskip-release -Dskip-non-native closes #24495 closes #24498 closes #24713
2025-08-13sema: strip `@splat` operand result type before checking itDavid Rubin
2025-08-13Merge pull request #24381 from Justus2308/switch-better-underscoreMatthew Lugg
Enhance switch on non-exhaustive enums
2025-08-13std.io.Writer.Allocating: rename getWritten() to written()Isaac Freund
This "get" is useless noise and was copied from FixedBufferWriter. Since this API has not yet landed in a release, now is a good time to make the breaking change to fix this.
2025-08-13std.crypto.aegis: Absorb ad instead of encrypting it.Erik Schlyter
`Aegis256XGeneric` behaves differently than `Aegis128XGeneric` in that it currently encrypts associated data instead of just absorbing it. Even though the end result is the same, there's no point in encrypting and copying the ad into a buffer that gets overwritten anyway. This fix makes `Aegis256XGeneric` behave the same as `Aegis128XGeneric`.
2025-08-13std.Target: bump default android API level from 24 to 29Alex Rønne Petersen
According to https://apilevels.com, 88.5% of Android users are on 29+. Older API levels require libc as of https://github.com/ziglang/zig/pull/24629, which has confused some users. Seems reasonable to bump the default so most people won't be confused by this.
2025-08-13Merge pull request #24734 from Rexicon226/tsan-fixAlex Rønne Petersen
2025-08-13tsan: remove usage of libcrypt and libncurses headersAlex Rønne Petersen
https://github.com/llvm/llvm-project/pull/153351 Closes #24736.
2025-08-11std.ArrayList: make unmanaged the defaultAndrew Kelley
2025-08-11aarch64: implement more assembler instructionsJacob Young
2025-08-11std: introduce orderedRemoveManyAndrew Kelley
This algorithm is non-trivial and makes sense for any data structure that acts as an array list, so I thought it would make sense as a method. I have a real world case for this in a music player application (deleting queue items). Adds the method to: * ArrayList * ArrayHashMap * MultiArrayList
2025-08-11std.fs.File: prefer getSize over getEndPosAndrew Kelley
The former detects when it is appropriate to switch to streaming mode. closes #24798
2025-08-11Dwarf: port to new Writer APIJacob Young
2025-08-11cbe: emit `nonstring` attributeJacob Young
Closes #24545
2025-08-10Writer: Delete writePreserve/writeAllPreserveRyan Liptak
This is one way of partially addressing https://github.com/ziglang/zig/issues/24767 - These functions are unused - These functions are untested - These functions are broken + The same dangling pointer bug from 6219c015d8e8c958d96e5caa5ef0dbab9c414996 exists in `writePreserve` + The order of the bytes preserved in relation to the `bytes` being written can differ depending on unused buffer capacity at the time of the call and the drain implementation. If there ends up being a need for these functions, they can be fixed and added back.
2025-08-11tsan: remove interceptors for termioDavid Rubin
2025-08-10std.fs.File.Reader.getSize: check file kind on statAndrew Kelley
closes #24794
2025-08-10std.net.Stream.Reader: init size_errAndrew Kelley
This code knows in advance that stat() should never be called. closes #24754
2025-08-10Merge pull request #24774 from kcbanner/fixup_webui_windowsAndrew Kelley
Fix `respondWebSocket`, use overlapped sockets on Windows, and re-enable --webui
2025-08-10docs(zon/stringify.zig): Added missing non-serializable typeAlexandre Blais
2025-08-10std.c: Remove serenity's internet_checksum() functionLinus Groh
See: https://github.com/SerenityOS/serenity/commit/59911d8da3da36aefd2d4902a0fdfc21e1f6f8ac
2025-08-09Merge pull request #24743 from ziglang/BufferedWriterAndrew Kelley
std.Io: delete BufferedWriter
2025-08-09net: Always set WSA_FLAG_OVERLAPPED when creating Windows sockets. Rework ↵kcbanner
send and receive logic to use overlapped I/O. build-web: Remove the now-redundant supports_recv logic
2025-08-09Fix `respondWebSocket`, enable --webui on Windowskcbanner
This commit re-enables the --webui functionality on windows, with the caveat that rebuild functionality is still disabled (due to deadlocks caused by reading to / writing from the same non-overlapped socket on multiple threads). I updated the UI to be aware of this, and hide the `Rebuild` button. http.Server: Remove incorrect advance() call. This was causing browsers to disconnect the websocket, as we were sending undefined bytes. build.WebServer: Re-enable on windows, but disable functionality that requires receiving messages from the client build-web: Show total times in tables
2025-08-08std.Io.Writer.Allocating: configurable bump amountAndrew Kelley
2025-08-08zig std: fix build failuresAndrew Kelley
2025-08-08std.Io: remove BufferedWriterAndrew Kelley
2025-08-08std.compress.flate.Decompress: fix buffer size in testAndrew Kelley
2025-08-08compiler: improve error reportingmlugg
The functions `Compilation.create` and `Compilation.update` previously returned inferred error sets, which had built up a lot of crap over time. This meant that certain error conditions -- particularly certain filesystem errors -- were not being reported properly (at best the CLI would just print the error name). This was also a problem in sub-compilations, where at times only the error name -- which might just be something like `LinkFailed` -- would be visible. This commit makes the error handling here more disciplined by introducing concrete error sets to these functions (and a few more as a consequence). These error sets are small: errors in `update` are almost all reported via compile errors, and errors in `create` are reported through a new `Compilation.CreateDiagnostic` type, a tagged union of possible error cases. This allows for better error reporting. Sub-compilations also report errors more correctly in several cases, leading to more informative errors in the case of compiler bugs. Also fixes some race conditions in library building by replacing calls to `setMiscFailure` with calls to `lockAndSetMiscFailure`. Compilation of libraries such as libc happens on the thread pool, so the logic must synchronize its access to shared `Compilation` state.
2025-08-08std.Io.Writer.Allocating.sendFile: use logicalPosAndrew Kelley
fixes #24754 tested with `zig build test-std -Dskip-release`
2025-08-08Io.Writer fix dangling pointerIgor Anić
While underlying writer is Allocating writer buffer can grow in vtable.drain call. We should not hold pointer to the buffer before that call and use it after. This remembers positions instead of holding reference.
2025-08-08Fix: std.elf offset computationGiuseppe Cesarano
2025-08-08Merge pull request #24740 from ziglang/http-plus-fixesAndrew Kelley
fetch, tls, and http fixes
2025-08-08Merge pull request #24742 from ziglang/CountingWriterAndrew Kelley
std.Io: delete CountingWriter
2025-08-08Io.Reader fix defaultReadVecIgor Anić
Running tar.pipeToFileSystem compressed_mingw_includes.tar file from #24732 finishes in infinite loop calling defaultReadVec with: r.seek = 1024 r.end = 1024 r.buffer.len = 1024 first.len = 512 that combination calls vtable.stream with 0 capacity writer and loops forever. Comment is to use whichever has larger capacity, and this fix reflects that.
2025-08-08flate: Handle invalid block typeRyan Liptak
Fixes `panic: invalid enum value` when the type bits had the u2 value of 3. Contributes towards #24741
2025-08-07link.Dwarf: minimal changes to remove CountingWriterAndrew Kelley
2025-08-07std.Io: delete CountingWriterAndrew Kelley
2025-08-08std.os.windows: map RtlGenRandom() failure to error.SystemResourcesAlex Rønne Petersen
Closes #23666.
2025-08-07Merge pull request #24661 from alichraghi/spv4Andrew Kelley
spirv: refactor and remove deduplication ISel
2025-08-07std.crypto.tls.Client: always write to bufferAndrew Kelley
simplifies the logic & makes it respect limit
2025-08-07std.http.bodyReader: add missing flush in endUnflushedAndrew Kelley
It's a bit counter-intuitive, but there are two streams here: the implementation here, and the connected output stream. When we say "unflushed" we mean don't flush the connected output stream because that's managed externally. But an "end" operation should always flush the implementation stream.
2025-08-07Fetch: handle compressed git+httpAndrew Kelley
2025-08-07std.http.Client: fix fetching by adding a bufferAndrew Kelley