Mason Remaley
fa1695a8b0
std.zon.parse: make ast and zoir fields of Diagnostics non-optional
2025-04-02 06:09:21 +01:00
Mason Remaley
65649576db
std.zon.parse: rename Status to Diagnostics
...
This name is more appropriate and in line with the rest of `std`.
2025-04-02 06:08:55 +01:00
Mason Remaley
3b2fec17a4
std.zon: populate Zoir.Node.Index values with corresponding ZOIR node
...
This allows using `std.zon` to parse schemas which are not directly
representable in the Zig type system; for instance, `build.zig.zon`.
2025-04-02 06:08:04 +01:00
David Rubin
1b62a22268
Sema: increment extra index even if return type is generic
2025-04-02 01:34:17 +02:00
Carmen
9720bade7a
std.start: allow return uefi error union in main ( #23425 )
2025-04-01 17:10:10 +00:00
Carmen
fa86e09fb3
std.os.uefi.protocol: ziggify function signatures ( #23214 )
2025-04-01 10:47:51 +00:00
Ali Cheraghi
b636d56d6a
zon: normalize negative zeroes
2025-03-31 19:07:34 -04:00
Jacob Young
b431e9af97
Elf: fix incrementally reallocating the last atom in a section
2025-03-31 19:06:25 -04:00
mlugg
d53cc5e5b2
Sema: allow @ptrCast slice of zero-bit type to slice of non-zero-bit type
...
This is actually completely well-defined. The resulting slice always has
0 elements. The only disallowed case is casting *to* a slice of a
zero-bit type, because in that case, you cna't figure out how many
destination elements to use (and there's *no* valid destination length
if the source slice corresponds to more than 0 bits).
2025-03-31 19:03:08 -04:00
Parker Liu
0bdc0bb534
translate-c: fix referencing extern locals from nested blocks
2025-03-31 20:22:03 +03:00
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