Alex Rønne Petersen
0753af792a
Merge pull request #23371 from alexrp/ci-redundancy
...
Remove some `aarch64-linux` CI steps that are already covered by `x86_64-linux`
2025-03-31 17:51:25 +02:00
Alex Rønne Petersen
c118cd6406
Merge pull request #23417 from dweiller/zstd-fixes
...
Zstd fixes
2025-03-31 17:50:32 +02:00
Simon Brown
43ad87555e
Add quota for comptime sort, add test
2025-03-31 17:47:46 +02:00
dweiller
d034f2a87b
std.compress.zstd: ensure window size fits into usize
2025-03-31 17:22:44 +11:00
dweiller
7a7d6a02a5
std.compress.zstd: fix OOB access in literal decode
...
When decoding the literals section of a compressed block, the length of
the regenerated size of the literals must be checked against the buffer
literals are decoded into.
2025-03-31 17:22:44 +11:00
David Rubin
acfdad8581
Sema: convert slice sentinel to single pointer correctly
2025-03-30 03:41:00 +01:00
mlugg
f296eec294
Zcu: resolve layout of analyzed declaration type
...
Resolves : #19888
2025-03-29 22:46:31 +00:00
mlugg
eee752ea5a
compiler: "illegal behavior", not "undefined behavior", in errors
2025-03-29 18:40:23 -04:00
Frank Denis
ca1fc3827e
crypto.ecdsa: fix EcdsaP384Sha3_384 constant name ( #23403 )
...
Spotted by @deatil -- Thanks!
2025-03-29 14:52:34 +00:00
Sean Stasiak
6e8493daa3
check result of mmap() call to handle a large base_addr value correctly
2025-03-27 20:34:41 +01:00
Alex Rønne Petersen
c85534a5c6
stage1: Update zig1.wasm.
...
Signed-off-by: Alex Rønne Petersen <alex@alexrp.com>
2025-03-27 17:43:05 +01:00
Alex Rønne Petersen
2b57f6b717
Merge pull request #23378 from alexrp/build-zig-cleanup
2025-03-27 17:12:17 +01:00
Alex Rønne Petersen
cc9634a2d3
Merge pull request #23373 from alexrp/get-base-address
...
`std.process`: Some minor fixes for `getBaseAddress()`
2025-03-27 15:39:24 +01:00
GalaxyShard
b5a5260546
std.Build: implement addEmbedPath for adding C #embed search directories
2025-03-27 09:47:42 +01:00
blurrycat
fb188c3d18
std.posix: add getuid()/geteuid()
2025-03-27 07:58:27 +00:00
Alex Rønne Petersen
dc66f4384f
build: increase test-std max rss
2025-03-27 04:36:27 +00:00
Андрей Краевский
aac800ec65
std.meta.FieldType -> @FieldType
2025-03-27 03:49:38 +00:00
Alex Rønne Petersen
f71590d4c4
build.zig: Statically link LLVM libraries for experimental targets if requested.
2025-03-27 00:31:11 +01:00
Alex Rønne Petersen
09783b8544
ci: Build stage4 and run behavior tests with it on aarch64-linux-debug.
...
This ensures that we at least have some relatively lightweight coverage of
building and using stage4 from a newly built stage3.
2025-03-27 00:22:54 +01:00
Alex Rønne Petersen
db7db48028
Merge pull request #23339 from Iced-Sun/master
...
std.posix: update LFS64 interfaces for android bionic C
2025-03-26 23:25:08 +01:00
Alex Rønne Petersen
2489b5fd74
build.zig: Stop setting _WIN32_WINNT=0x601 (Windows 7) when targeting MinGW.
...
Our default minimum version for Windows has been Windows 10 for a while.
2025-03-26 23:12:55 +01:00
Felix "xq" Queißner
0ed905b9c6
Enables parsing for '-Wl,-rpath,' in pkg-config output, allows better support for NixOS linking.
2025-03-26 22:55:18 +01:00
Alex Rønne Petersen
ccffc7f108
build.zig: Don't disable LTO when targeting MinGW.
...
We stopped building mingw32.lib with LTO recently, so this is no longer needed.
2025-03-26 22:46:27 +01:00
Pratham
5bb9963bbb
abiAndDynamicLinkerFromFile: return an error when the file is not actually dynamic ( #19928 )
2025-03-26 19:54:10 +00:00
Alex Rønne Petersen
b9efdbb412
std.process: Fix getBaseAddress() to handle all Darwin OSs.
2025-03-26 20:39:07 +01:00
Alex Rønne Petersen
d56a99442b
std.process: Don't use _mh_execute_header in getBaseAddress() on BSDs.
...
Only the Mach-O format has this symbol.
2025-03-26 20:39:07 +01:00
Alex Rønne Petersen
0cf5f0d0b0
std.process: Fix getBaseAddress() for linux + libc.
...
In this case we should use the getauxval() from libc, not our own.
2025-03-26 20:39:07 +01:00
wooster0
263ba34619
linux: don't export getauxval when not required
2025-03-26 20:37:35 +01:00
Eric Joldasov
27c1f2b3a0
zig build: allow to choose "lazy mode" for fetching process
...
`--fetch` flag now has additional optional parameter, which specifies
how lazy dependencies should be fetched:
* `needed` — lazy dependencies are fetched only if they are required
for current build configuration to work. Default and works same
as old `--fetch` flag.
* `all` — lazy dependencies are always fetched. If `--system` flag
is used after that, it's guaranteed that **any** build configuration
will not require additional download of dependencies during build.
Helpful for distro packagers and CI systems:
https://www.github.com/ziglang/zig/issues/14597#issuecomment-1426827495
If none is passed, behaviour is same as if `needed` was passed.
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
2025-03-26 19:00:33 +01:00
Kendall Condon
b4b1daf001
Allocator.create: properly handle alignment for zero-sized types ( #21864 )
2025-03-26 15:31:57 +00:00
Alex Rønne Petersen
27108cc99e
ci: Don't do the update-zig1 test steps on aarch64-linux.
...
We already do these on the x86_64-linux machines. They're fairly costly, and it
seems very unlikely to me that they'll uncover issues that wouldn't be uncovered
on x86_64-linux.
2025-03-26 16:30:21 +01:00
Alex Rønne Petersen
628092c8c7
ci: Don't build the compiler for arm-linux-musleabihf on aarch64-linux.
...
We already do this smoke test on the x86_64-linux machines, so I don't see a
point in duplicating this effort here.
2025-03-26 16:30:02 +01:00
Alex Rønne Petersen
d9165aacce
ci: Set execute bit on aarch64-linux scripts.
2025-03-26 16:30:00 +01:00
dweiller
b84db311d9
zig build: add env_map entries to hash for Step.Run
...
This change fixes false-positive cache hits for run steps that get run
with different sets of environment variables due the the environment map
being excluded from the cache hash.
2025-03-26 14:48:04 +01:00
孙冰
0118912e2d
std.posix: update LFS64 interfaces for android bionic C
2025-03-26 20:00:05 +08:00
孙冰
d7e944a628
std.Target: Update default Android API level to 24
...
API level 24 completes _FILE_OFFSET_BITS=64 support in bionic, c.f.
https://android.googlesource.com/platform/bionic/+/HEAD/docs/status.md .
According to https://apilevels.com , API level 24 (Android 7 released in 2017)
has 97% cumulative usage.
2025-03-26 19:48:21 +08:00
Andrew Barchuk
5b4759bd3c
Clarify the multidimensional array example
...
Use a rectangular matrix instead of a square one to distinguish rows and
columns more clearly. Extend the example with row access.
2025-03-26 11:52:52 +01:00
Alex Rønne Petersen
b350049f51
Merge pull request #23062 from ianic/io_uring_bind
...
io_uring: Update to kernel changes in 6.11 and 6.12
2025-03-26 11:39:56 +01:00
mlugg
a7ff042f98
Zcu: include named tests in resolved references
...
Oops, a little typo from yours truly! No test for this one, because we
don't have any way of testing the reference trace.
2025-03-26 10:20:19 +00:00
Ryan Liptak
63014d3819
Add test to ensure the BatBadBut mitigation handles trailing . and space safely
...
Context:
- https://blog.rust-lang.org/2024/09/04/cve-2024-43402.html
- https://github.com/rust-lang/rust/pull/129962
Note that the Rust test case for this checks that it executes the batch file successfully with the proper mitigation in place, while the Zig test case expects a FileNotFound error. This is because of a PATHEXT optimization that Zig does, and that Rust doesn't do because Rust doesn't do PATHEXT appending (it only appends .exe specifically). See the added comment for more details.
2025-03-26 10:55:18 +01:00
Pat Tullmann
2210c4c360
lib/std/posix: test ftruncate via std.fs.File.setEndPos()
...
Add a test for std.fs.File's `setEndPos` (which is a simple wrapper around
`std.posix.ftruncate`) to exercise some success and failure paths.
Explicitly check that the `ftruncate` length isn't negative when
interpreted as a signed value. This avoids having to decode overloaded
`EINVAL` errors.
Add errno handling to Windows path to map INVALID_PARAMETER to FileTooBig.
Fixes #22960
2025-03-26 02:57:23 +01:00
Jonathan Marler
1408288b95
support more process creation options on Windows
...
Adds a CreateProcessFlags packed struct for all the possible flags to
CreateProcessW on windows. In addition, propagates the existing
`start_suspended` option in std.process.Child which was previously only
used on Darwin. Also adds a `create_no_window` option to std.process.Child
which is a commonly used flag for launching console executables on
windows without causing a new console window to "pop up".
2025-03-25 23:48:27 +01:00
Arnau Camprubí
8a8b3019f3
Fix std.debug.dumpHex address offsets
2025-03-25 23:20:56 +01:00
Alex Rønne Petersen
cb8d7a8110
Merge pull request #23310 from Rexicon226/fix-23309
...
big.int: return normalized results from `{add,sub}Carry`
2025-03-25 18:44:35 +01:00
Kuwazy
6b6dc1cd3a
Added check for HTTP version and GET method when upgrading WebSocket to comply with RFC 6455. ( #23332 )
2025-03-25 15:00:50 +01:00
Alex Rønne Petersen
e1c6af2840
Merge pull request #23220 from samy-00007/bytesAsSlice-fix
...
Minor fix for `Allocator.remap` and `mem.bytesAsSlice` for zero-sized types
2025-03-25 13:45:10 +01:00
孙冰
fbbdde41b4
std.c: android bionic C supports arc4random_buf and getentropy
...
1. https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/include/bits/getentropy.h
2. https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/include/stdlib.h
2025-03-25 13:17:45 +01:00
Alex Rønne Petersen
c94d926bba
Merge pull request #23007 from rootbeer/posix-eaccess-eperm
...
lib/std: Make usage of PermissionDenied & AccessDenied consistent
2025-03-25 11:21:05 +01:00
godalming123
5bb4fef30a
Update the documentation comment in arena_allocator.zig to be more accurate
...
Update the documentation comment in arena_allocator.zig to specify that free() is a no-op unless the item is the most recent allocation.
2025-03-25 06:19:28 +00:00
samy007
4595b1ee06
std.mem.bytesAsSlice: fix to support zero-bytes sized types
...
also added a test for json parsing of zero sized type
2025-03-24 22:08:05 +01:00