10502 Commits

Author SHA1 Message Date
David Rubin
9432a9b6e1 build: add bundle_ubsan_rt 2025-02-25 11:22:33 -08:00
David Rubin
fc77678339 mem: add @branchHint to indexOfSentinel
also seems to work around aarch64 LLVM miscompilation 🤔
2025-02-25 11:22:33 -08:00
David Rubin
95720f007b move libubsan to lib/ and integrate it into -fubsan-rt 2025-02-25 11:22:33 -08:00
David Rubin
babee5f73c ubsan: implement some more checks 2025-02-25 11:22:33 -08:00
David Rubin
c27b7973c9 Compilation: use the minimal runtime in ReleaseSafe 2025-02-25 11:22:33 -08:00
David Rubin
eef8d4ff4f ubsan: switch to using std.builtin.panicExtra to log errors 2025-02-25 11:22:33 -08:00
David Rubin
5e0073c898 ubsan: add a basic runtime 2025-02-25 11:22:33 -08:00
Alex Rønne Petersen
c7e99b93a4 Revert "skip regressed LLVM 17 std lib test on powerpc"
This reverts commit 5b8af7a2a9140fd0533961b62addc61f57b33343.

Closes #16951.
2025-02-25 18:28:34 +01:00
Alex Rønne Petersen
bedf806672
Merge pull request #22999 from alexrp/mingw-update 2025-02-25 12:54:55 +01:00
Alex Rønne Petersen
51b44be9cc
std.zig.target: Support new wiaguid library name for MinGW-w64. 2025-02-24 12:01:12 +01:00
Alec Fessler
1cc388d526 stdlib: handle EEXIST in mmap with FIXED_NOREPLACE. Fixes #21475 2025-02-24 04:36:14 -05:00
Alex Rønne Petersen
ecc76348e6
Merge pull request #22154 from alexrp/disable-intrinsics
compiler: Implement `@disableIntrinsics()` builtin function.
2025-02-24 08:25:23 +01:00
Linus Groh
68bd82d0cc std.posix: Handle USER_MAPPED_FILE in windows ftruncate() impl 2025-02-23 16:58:26 -05:00
Andrew Kelley
e47f340e23 std.Build.Step.ConfigHeader: follow deprecation policy 2025-02-23 12:45:35 -08:00
Andrew Kelley
86f35479d9
Merge pull request #22794 from cbilz/autoconf_at
std.Build.Step.ConfigHeader: Add support for Autoconf-style `@FOO@` variables
2025-02-23 15:36:49 -05:00
Linus Groh
c44f4501e7 std.math.big.int: Support strings up to base 36
Co-Authored-By: samy007 <samy2014@free.fr>
2025-02-23 11:25:35 +00:00
mlugg
5e20e9b449 Sema: allow @ptrCast of slices changing the length
Also, refactor `Sema.ptrCastFull` to not be a horrifying hellscape.
2025-02-23 08:28:58 +00:00
Andrew Kelley
d6f8200294 zig fmt 2025-02-22 22:21:24 -08:00
Constantin Bilz
75b0538688 std.Build: Allow ConfigHeader values to be added at build.zig runtime 2025-02-22 23:31:17 -05:00
Anders Bondehagen
77007445bf
std.net: Fix IPv6 address format compression for long zero runs (#22441) 2025-02-22 19:52:47 -08:00
Linus Groh
4b0f77cc1f std.crypto.tlcsprng: Fix hardcoded use of defaultRandomSeed()
Instead of hardcoding a call to defaultRandomSeed() use the customizable
std.options.cryptoRandomSeed() like in the rest of the function.

Closes #19943.
2025-02-22 22:39:40 -05:00
Alex Rønne Petersen
6ba785584a
compiler: Implement @disableIntrinsics() builtin function.
Closes #21833.
Closes #22110.
2025-02-23 04:08:56 +01:00
Andrew Kelley
8683f25d24 std.heap.DebugAllocator: default wasm to 64K page size
including on freestanding
2025-02-22 21:06:00 -05:00
Andrew Kelley
dd54c48aa2 std.crypto.asn1: fix merge conflicts 2025-02-22 17:44:11 -08:00
Andrew Kelley
ed7004a2ee
Merge pull request #19976 from clickingbuttons/asn1
std.crypto: Add ASN1 module with OIDs and DER
2025-02-22 20:21:09 -05:00
Andrew Kelley
eb3c7f5706 zig build fmt 2025-02-22 17:09:20 -08:00
Andrew Kelley
c0c911bfa7 zig fmt: fix invalid alignment on frees 2025-02-22 17:09:20 -08:00
Andrew Kelley
ed55b2ef17 update to new pop API 2025-02-22 17:09:20 -08:00
87flowers
8469a44c9c std/http/Client: Remove TODO comments on indentation 2025-02-22 17:09:20 -08:00
87flowers
87172ee4e6 std/zig/render: Add doc comments to AutoIndentingStream 2025-02-22 17:09:20 -08:00
87flowers
fdf68c2f2e std/zig/parser: Add indentation tests 2025-02-22 17:09:20 -08:00
87flowers
c724e157d6 std/zig/render: implement fixes for unit tests 2025-02-22 17:09:20 -08:00
87flowers
a702dc31cc std/zig/render: assigns are .after_equals 2025-02-22 17:09:20 -08:00
87flowers
6013b53702 std/zig/render: Collapse one level of indentation in binop after equals sign 2025-02-22 17:09:20 -08:00
87flowers
9b2677c639 std/zig/render: Implement space mode to fix comment indentation 2025-02-22 17:09:20 -08:00
87flowers
ec3e4cc14b std/zig/render: Initial implementation of indentation 2025-02-22 17:09:20 -08:00
87flowers
1b0584fd02 std/zig/render: Implement AutoIndentingStream.init 2025-02-22 17:09:19 -08:00
geemili
6ef2384c07 std.DynLib: add support for DT_GNU_HASH sections in elf files 2025-02-22 17:33:49 -05:00
Chris Covington
b7512c3e5d
Add rapidhash (#22085) 2025-02-22 14:32:48 -08:00
Wyatt Radkiewicz
33ffbb32c9
std.zig.system.NativePaths: Add Homebrew paths (#22738) 2025-02-22 14:22:54 -08:00
David Rubin
36fc2d2607 AstGen: make layout specifiers on opaque containers a compile error 2025-02-22 17:21:34 -05:00
Andrew Kelley
6fe1993d80 fix ArrayHashMap setKey when store_hash=true 2025-02-22 00:44:35 -05:00
Alex Rønne Petersen
f87b443af1 link.MachO: Add support for the -x flag (discard local symbols).
This can also be extended to ELF later as it means roughly the same thing there.

This addresses the main issue in #21721 but as I don't have a macOS machine to
do further testing on, I can't confirm whether zig cc is able to pass the entire
cgo test suite after this commit. It can, however, cross-compile a basic program
that uses cgo to x86_64-macos-none which previously failed due to lack of -x
support. Unlike previously, the resulting symbol table does not contain local
symbols (such as C static functions).

I believe this satisfies the related donor bounty: https://ziglang.org/news/second-donor-bounty
2025-02-22 06:35:19 +01:00
Andrew Kelley
a7467b9bb2
Merge pull request #22941 from Techatrix/config-header
std.Build.Step.ConfigHeader: improve handling of autoconf style headers
2025-02-22 00:25:09 -05:00
Kiëd Llaentenn
d31bda13cb std.atomic: make cache_line const a comptime_int
This fixes potential issues and unintended coercions in other areas,
such as std.ArrayList.
2025-02-22 03:48:09 +01:00
Mason Remaley
339b628d4c
Output zig targets as ZON instead of JSON (#22939)
* Adds startTupleField/startStructField, makes pattern in print targets less verbose

* Makes some enums into strings

* Start/finish renamed to begin/end

I feel bad changing this, but I don't know why I named them this way in the first place.
Begin/end is consistent with the json API, and with other APIs in the wild that follow this pattern.
Better to change now than later.
2025-02-21 21:40:57 -05:00
Frank Denis
65e7ede499 crypto.Ed25519.KeyPair: return an error rather than assert
When runtime safety is turned on, `Ed25519.fromSecretKey()` can
currently hit an assertion if the format of the secret key is
invalid.

Return an error instead, so that applications can recover.
2025-02-21 22:45:38 +01:00
Constantin Bilz
af2b6893e2 std.Build.Step.ConfigHeader: Add tests for Autoconf @FOO@ variables 2025-02-21 15:22:39 +01:00
Constantin Bilz
62e388e73e std.Build.Step.ConfigHeader: Add support for Autoconf @FOO@ variables
Add the new style `Style.autoconf_at`. Rename the existing
`Style.autoconf` (which uses `#undef` directives) to
`Style.autoconf_undef`.
2025-02-21 15:22:39 +01:00
Alex Rønne Petersen
31e7c95bd2 std.time: Make tests less flaky.
For the Timer decltest in particular, the margin check is not going to help if
the kernel just decides not to schedule the thread for a while after we call
timer.reset().

Failure observed here: https://github.com/ziglang/zig/actions/runs/13443634035/job/37563803341?pr=22909
2025-02-21 09:03:46 +01:00