Commit Graph

31722 Commits

Author SHA1 Message Date
Benjamin
7cc7ae1fd3
Use options debug format if it is provided (#21995)
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2024-11-16 19:32:11 +00:00
Gabriel Borrelli
ccf8488a1e Add missing pthread_key_t definition for Darwin 2024-11-16 17:18:07 +01:00
Andrew Kelley
bfcf18c5a7 langref: delete misleading example code about packed structs 2024-11-13 15:35:16 -08:00
Carl Åstholm
4fc295dc02 Take eagerness into account when deduplicating dependencies
If the same dependency is first found as lazy and then later as eager,
the existing entry needs to be updated to eager in order for
`b.dependency()` to work.
2024-11-13 14:59:46 -08:00
Alex Rønne Petersen
e5d9d3f8a1 Compilation: Pass -municode on to Clang.
This is supposed to define the UNICODE macro; it's not just a linker option.

Closes #21978.
2024-11-13 14:22:45 +01:00
mlugg
9ebce51e16 compiler: un-jit zig fmt
This command being JITed leads to a substantially worse first-time user
experience, since you have to wait for upwards of 20 seconds for
`fmt.zig` to build. This is especially bad when your editor is
configured to run `zig fmt` on save and does so in a blocking manner. As
such, it makes sense from a usability perspective to not JIT this
particular command.
2024-11-12 21:55:46 -08:00
Daniel Hooper
9996f8b9b1
Fix std.c.EXC.MASK struct to match definition in mach/exception_types.h (#21964)
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2024-11-13 05:27:02 +00:00
Benjamin Hetz
c59aee03c8 Flags for SIOC{G,S}IFFLAGS 2024-11-13 06:11:39 +01:00
cancername
c271fe5092
std.atomic: add a function to get the cache line size for a particular cpu (#21956) 2024-11-13 05:35:05 +01:00
PauloCampana
e6989fe637
std: fix compiler errors
See: #20505, #21094
2024-11-12 22:08:27 +01:00
Alex Rønne Petersen
1db8cade5a
Merge pull request #21920 from alexrp/nobuiltin
compiler: Improve handling of `-fno-builtin` and compiler-rt options
2024-11-12 16:40:00 +01:00
mlugg
bbbc95afd0 AstGen: add missing rvalue call to labeledBlockExpr
...and fix a minor x86_64 backend bug exposed by this fix.

Resolves: #21974
2024-11-12 14:51:10 +00:00
gooncreeper
9fa9c7abd0 std.testing.expectError: fix error names 2024-11-12 14:35:14 +02:00
Andrew Kelley
862266514a Revert "Enable thread_pool function to throw errors (#20260)"
This reverts commit d346d074eb.

I would like a chance to review this, please.
2024-11-11 14:07:07 -08:00
ippsav
d346d074eb
Enable thread_pool function to throw errors (#20260)
* std.ThreadPool: allow error union return type

* allow noreturn in Pool.zig
2024-11-11 15:34:24 -06:00
Matthew Lugg
28bdab385a
Merge pull request #21961 from mlugg/incr-cases
incremental: remove legacy cases, add some new ones
2024-11-11 20:00:00 +00:00
mlugg
6e56bc1096
test: add new incremental case
This is similar to the old `llvm/shift_right_plus_left` case, which was
disabled by 1b1c78c. The case is not enabled on the LLVM backend, since
incremental compilation support for this backend is a work in progress
and is tracked by #21165. It passes on the x86_64-linux target with the
self-hosted backend.

Resolves: #12288
2024-11-11 12:22:55 +00:00
mlugg
ca12e4f33e
test: remove old-style incremental cases, add a few new incremental cases
These cases have been disabled for a while, and we have transitioned to
using a compact file format for incremental test cases.

I was originally planning to port all of these cases, but the vast
majority aren't testing anything interesting, so it wasn't worth the
effort. I did look through each one; anything interesting being tested
has been extracted into a new case in `test/incremental/`.

Two of the new tests are currently failing with the self-hosted ELF
linker, and thus are currently only enabled with the C backend.

Resolves: #12844
2024-11-11 12:22:48 +00:00
Daniel Hooper
560d6b99d5
Fix silent zig fmt errors (#21948) 2024-11-11 01:24:14 -08:00
mlugg
f83bb94ca6 test_runner: replace ugly hack with @FieldType 2024-11-11 09:05:51 +00:00
Frank Denis
05a3ac43e9
crypto.ascon: support up to 16 rounds, and update links (#21953)
Initial public draft NIST SP 800-232 specifies Ascon constants
up to 16 rounds for future extensions. So, add these new constants.
2024-11-10 20:43:09 +00:00
Robin Voetter
62f4a6b4d8
Merge pull request #21937 from Snektron/spirv-vulkan-ptrs
spirv: miscellaneous vulkan + zig stuff
2024-11-09 21:50:33 +01:00
Wooster
35201e9d93 Sema: fix wording in error message
It's an FQN, not an actual file name.
2024-11-09 20:21:32 +00:00
Robin Voetter
9cd7b8359c
spirv: enable variable pointers for now
This seems to be required for ptr_elem_ptr with storage buffers. Note that
this does not imply that the pointer can be regarded as physical too.

Some variants of ptr_elem_ptr will need to be forbidden
2024-11-09 01:53:13 +01:00
Robin Voetter
efb7539cb6
spirv: dont emit forward pointer for annotation instructions 2024-11-09 01:53:13 +01:00
Robin Voetter
89bd987f1c
spirv: emit ArrayStride for many-item pointers 2024-11-08 20:43:57 +01:00
Robin Voetter
b16252b17e
spirv: make all vulkan structs Block for now 2024-11-08 20:43:57 +01:00
Robin Voetter
d35dfc5a3f
add storage_buffer address space 2024-11-08 20:43:57 +01:00
Robin Voetter
688d7055e3
spirv: assembler hacky constant placeholders 2024-11-08 20:43:55 +01:00
Robin Voetter
b5301558ae
spirv: make default generic address space for vulkan Function
We are not using Private variables. This needs to be cleaned up a bit
more, this will happen with the general address space improvements.
2024-11-08 20:38:23 +01:00
Robin Voetter
7682ced08e
spirv: track global OpVariables properly in assembler
Also cleans up the assembler a bit in general.
2024-11-08 20:38:22 +01:00
Robin Voetter
4fbc100959
spirv: properly resolve type inputs in assembly
For now the frontend still allows type inputs in assembly. We
might as well resolve them properly in the SPIR-V backend.
2024-11-08 20:38:21 +01:00
Robin Voetter
08ad7afc1e
spirv: forbid pointer arithmetic 2024-11-08 20:38:20 +01:00
Alex Rønne Petersen
c9052ef931
llvm: Disable lowering to f16 on sparc. 2024-11-08 14:57:16 +01:00
Alex Rønne Petersen
15c920ff2a
std.Target: Fix toCoffMachine() value for thumb. 2024-11-08 14:57:12 +01:00
Alex Rønne Petersen
9904a3ac9d
c: Include Os.Tag.other in the list of freestanding OSs. 2024-11-08 14:56:55 +01:00
Alex Rønne Petersen
9e1dd3dec2
c: Use internal linkage when running tests.
This matches what we do for compiler-rt.
2024-11-08 14:56:25 +01:00
Jacob Young
e5f5229fd6
Merge pull request #21872 from jacobly0/tlsv1.2
std.crypto.tls: implement TLSv1.2
2024-11-08 02:01:52 -05:00
Jacob Young
9373abf7f7 std.http.Client: change ssl key log creation permission bits
This is the same mode used by openssh for private keys.  This does not
change the mode of an existing file, so users who need something
different can pre-create the file with their designed permissions or
change them after the fact, and running another process that writes to
the key log will not change it back.
2024-11-07 20:56:33 -05:00
Jacob Young
75adba7cb9 std.crypto.tls: add support for secp384r1 key share 2024-11-07 20:25:26 -05:00
Jacob Young
a4e88abf04 std.crypto.tls: advertise all supported signature algorithms 2024-11-07 20:25:26 -05:00
Jacob Young
fbaefcaa94 std.crypto.tls: support the same key sizes as certificate verification 2024-11-07 20:25:26 -05:00
Jacob Young
a6ede7ba86 std.crypto.tls: support handshake fragments 2024-11-07 20:25:26 -05:00
Jacob Young
de53e6e4f2 std.crypto.tls: improve debuggability of encrypted connections
By default, programs built in debug mode that open a https connection
will append secrets to the file specified in the SSLKEYLOGFILE
environment variable to allow protocol debugging by external programs.
2024-11-07 20:25:26 -05:00
Jacob Young
d86a8aedd5 std.crypto.tls: increase handshake buffer sizes 2024-11-07 20:25:26 -05:00
Jacob Young
485f20a10a std.crypto.tls: remove hardcoded initial loop
This was preventing TLSv1.2 from working in some cases, because servers
are allowed to send multiple handshake messages in the first handshake
record, whereas this inital loop was assuming that it only contained a
server hello.
2024-11-07 20:25:26 -05:00
Jacob Young
90a761c186 std.crypto.tls: make verify data checks timing safe 2024-11-07 20:25:26 -05:00
Jacob Young
7afb277725 std.crypto.tls: fix x25519_ml_kem768 key share
This is mostly nfc cleanup as I was bisecting the client hello to find
the problematic part, and the only bug fix ended up being

    key_share.x25519_kp.public_key ++
    key_share.ml_kem768_kp.public_key.toBytes()

to

    key_share.ml_kem768_kp.public_key.toBytes() ++
    key_share.x25519_kp.public_key)

and the same swap in `KeyShare.exchange` as per some random blog that
says "a hybrid keyshare, constructed by concatenating the public KEM key
with the public X25519 key".  I also note that based on the same blog
post, there was a draft version of this method that indeed had these
values swapped, and that used to be supported by this code, but it was
not properly fixed up when this code was updated from the draft spec.

Closes #21747
2024-11-07 20:25:26 -05:00
Jacob Young
7f20c78c95 std.crypto: delete new functions that are only used once 2024-11-07 20:25:26 -05:00
Jacob Young
4466f145d6 std.crypto.tls: support more key share params
This condition is already checked less restrictively in
`KeyShare.exchange`.
2024-11-07 20:25:26 -05:00