aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2025-08-28std.Io.Writer: add toArrayList/fromArrayListAndrew Kelley
2025-08-28std.Io: delete GenericWriterAndrew Kelley
2025-08-29Merge pull request #25045 from kada49/libc/common-impl-ceilAlex Rønne Petersen
libc: delete some superfluous libc c implementations
2025-08-28libc: delete superfluous c and assembly trunc implementationsDavid Senoner
2025-08-28process.totalSystemMemory: Avoid overflow on Linux when totalram is a 32-bit ↵Ryan Liptak
usize Fixes #25038
2025-08-28Reader.appendRemaining: Take ownership of the full allocated sliceRyan Liptak
Before this commit, calling appendRemaining with an ArrayList where list.items.len != list.capacity could result in illegal behavior if the Writer.Allocating resized the list during the appendRemaining call. Fixes #25057
2025-08-28AstGen: forward result type through unary float builtinsDavid Rubin
Uses a new `float_op_result_ty` ZIR instruction tag.
2025-08-28std.debug: remove `@frameAddress()` "UAF"mlugg
We can't call `@frameAddress()` and then immediately `return`! That invalidates the frame. This *usually* isn't a problem, because the stack walk `next` call will *probably* have a stack frame and it will *probably* be at the exact same address, but neither of those is a guarantee. On powerpc, presumably some unfortunate inlining was going on, so this frame was indeed invalidated when we started walking frames. We need to explicitly pass `@frameAddress` into any function which will return before we actually walk the stack. Pretty simple patch. Resolves: #24970
2025-08-28std.os.uefi: fix type error at MemoryType.format()tokyo4j
2025-08-28std.os.linux: powerpc syscalls clobber ctr and xerAlex Rønne Petersen
https://git.musl-libc.org/cgit/musl/commit/?id=f6944eb3c4ce1c97dc39dc36d32390dc9f70b67b
2025-08-28libc: delete superfluous c and assembly ceil implementationDavid Senoner
2025-08-27Merge pull request #25034 from ziglang/lzmaAndrew Kelley
std.compress: update lzma, lzma2, and xz to new I/O API
2025-08-27libc: remove c floorl implementaions forgotten in #24335David Senoner
2025-08-27Fix TLS 1.2 client key exchange to use negotiated named group (#25007)Frank Denis
The TLS 1.2 implementation was incorrectly hardcoded to always send the secp256r1 public key in the client key exchange message, regardless of which elliptic curve the server actually negotiated. This caused TLS handshake failures with servers that preferred other curves like X25519. This fix: - Tracks the negotiated named group from the server key exchange message - Dynamically selects the correct public key (X25519, secp256r1, or secp384r1) based on what the server negotiated - Properly constructs the client key exchange message with the appropriate key size for each curve type Fixes TLS 1.2 connections to servers like ziglang.freetls.fastly.net that prefer X25519 over secp256r1.
2025-08-27std.c: add correct SOMAXCONN for BSDsBrandon Black
Note the previous "28" here for openbsd was some kind of copy error long ago. That's the value of KERN.SOMAXCONN, which is an entirely different thing.
2025-08-26std.compress.xz: fix 32-bit targetsAndrew Kelley
2025-08-26std: update xz unit tests to new I/O APIAndrew Kelley
2025-08-26std.compress.lzma: fix unpacked size checking logicAndrew Kelley
2025-08-26std.compress.xz.Decompress: some tests passingAndrew Kelley
2025-08-26std.compress.xz: skeleton in placeAndrew Kelley
missing these things: - implementation of finish() - detect packed bytes read for check and block padding - implementation of discard() - implementation of block stream checksum
2025-08-26std.compress.lzma2: tests passingAndrew Kelley
2025-08-26std.compress.lzma: delete dead parameterAndrew Kelley
update is always passed as true
2025-08-26std.compress.lzma: tests passingAndrew Kelley
2025-08-26std.compress.lzma: update for new I/O APIAndrew Kelley
2025-08-26std.compress.xz: flatten namespacesAndrew Kelley
2025-08-26std.compress: flatten lzma and lzma2 namespacesAndrew Kelley
2025-08-27libc: use zig isnan and derivates for mingwDavid Senoner
2025-08-27Remove memcmp and memset from bundled musl and wasiYefeng Li
2025-08-26std.Build.WebServer: fix racemlugg
Just a typo: I wasn't actually using the duped message, so the message I sent could be freed in this interval.
2025-08-26std.Build.Step.Compile: fix race condition in args file creationIan Johnson
Fixes #23993 Previously, if multiple build processes tried to create the same args file, there was a race condition with the use of the non-atomic `writeFile` function which could cause a spawned compiler to read an empty or incomplete args file. This commit avoids the race condition by first writing to a temporary file with a random path and renaming it to the desired path.
2025-08-26Compilation: use std.DequeIsaac Freund
And delete DeprecatedLinearFifo from the source tree.
2025-08-26`std.ArrayList`: add `insertSliceAssumeCapacity()` and ↵Rue
`insertSliceBounded()` (#24978) closes #24929
2025-08-26std.Target: add vita osMaciej 'vesim' Kuliński
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2025-08-26std.Build.Step.TranslateC: forward --cache-dir and --global-cache-dir flagsAdamGoertz
2025-08-25add macOS handling for totalSystemMemory (#24903)Sardorbek Imomaliev
* add macos handling for totalSystemMemory * fix return type cast for .freebsd in totalSystemMemory * add handling for the whole Darwin family in totalSystemMemory
2025-08-25os.linux: faccessat wrapper prefer to faccessat syscall when flags is zero.Qun He
This make `fs.Dir.access` has compatibility like the zig version before. With this change the `zig build --search-prefix` command would work again like the zig 0.14 version when used on Ubuntu22.04, kernel version 5.4.
2025-08-25std: add a Deque data structureIsaac Freund
This is my penance for baiting andrew into deleting the existing generic queue data structures with my talk of "too many ring buffers". The new Reader and Writer interfaces are excellent ring buffers for many use cases, but a generic queue container type is now missing. This new double-ended queue, known more succinctly as a deque, is implemented from scratch based on the API design lessons learned from ArrayList over the years. The API is not yet as featureful as ArrayList, but the core functionality is in place and I will be using this in my personal projects shortly. I think it makes sense to add further functions as needed based on real-world use-cases.
2025-08-25Adds non allocating alternatives to ZON parse functions (#22916)Mason Remaley
* Adds "flat" alternatives to zon.parse.from* that don't support pointers * Fixes documentation * Removes flat postfix from non allocating functions, adds alloc to others * Stops using alloc variant in tests where not needed
2025-08-25Fix #24999: copy left-overs before we XOR into c. (#25001)Erik Schlyter
It is important we copy the left-overs in the message *before* we XOR it into the ciphertext, because if we're encrypting in-place (i.e., m == c), we will manipulate the message that will be used for tag generation. This will generate faulty tags when message length doesn't conform with 16 byte blocks.
2025-08-25Merge pull request #24995 from alexrp/ubsan-rt-hiddenAlex Rønne Petersen
ubsan-rt: export symbols with hidden visibility
2025-08-25start adding big endian RISC-V supportAlex Rønne Petersen
The big endian RISC-V effort is mostly driven by MIPS (the company) which is pivoting to RISC-V, and presumably needs a big endian variant to fill the niche that big endian MIPS (the ISA) did. GCC already supports these targets, but LLVM support will only appear in 22; this commit just adds the necessary target knowledge and checks on our end.
2025-08-25delete std.debug.FixedBufferReaderAndrew Kelley
now that std.Io.Reader has sufficient debug performance
2025-08-25std.zig.system: fix check for sparc "v8+" in getExternalExecutor()Alex Rønne Petersen
Targeting v9 on sparc32 doesn't by itself imply "v8+" mode (64-bit instructions in 32-bit code).
2025-08-25ubsan-rt: export symbols with hidden visibilityAlex Rønne Petersen
see 092352ec63d3a4e9ff59a5d8ad8f119bf0eda468
2025-08-24lib: Reword documentation for realloc to clarify size87
"byte size" is confusing. Clarify we mean number of items.
2025-08-24fix: fix typo in comment by removing repeated 'business' wordNathaniel Ketema
2025-08-24Update powi.zig to fix docstring formattingBecker A.
Without this change, the docs are formatted s.t. the text "Edge case rules ordered by precedence:" is appended onto the prior line of text "Underflow: Absolute value of result smaller than 1", instead of getting its own line.
2025-08-23disable stack tracing on powerpc64Andrew Kelley
tracked by #24970
2025-08-23std.debug: delete MemoryAccessorAndrew Kelley
This API is based around the unsound idea that a process can perform checked virtual memory loads to prevent crashing. This depends on OS-specific APIs that may be unavailable, disabled, or impossible due to virtualization. It also makes collecting stack traces ridiculously slow, which is a problem for users of DebugAllocator - in other words, everybody, all the time. It also makes strace go from being superbly clean to being awful.
2025-08-23std.fs.Dir: fix updateFile() to flush the file before updating its timesAlex Rønne Petersen
AtomicFile.finish() calls flush() which renders any previous updateTimes() calls useless. Regression introduced in f2a3ac7c0534a74ee544fdf6ef9d2176a8d62389. Closes #24927.