Andrew Kelley
33c7984183
add std.testing.random_seed
...
closes #17609
2024-07-23 11:43:12 -07:00
Andrew Kelley
6f3e9939d0
Merge pull request #20725 from ziglang/fuzz
...
initial support for integrated fuzzing
2024-07-23 11:39:19 -07:00
Jakub Konka
255547d7a6
Merge pull request #20731 from ziglang/parallel-macho-2
...
The tale of parallel MachO: part 2
2024-07-23 19:14:38 +02:00
Ryan Liptak
ac2459327f
autodoc: Preserve whitespace in inline code spans
...
Fixes #20754
2024-07-23 10:02:54 -07:00
Jakub Konka
f1af53f68e
macho: use pread syscall when loading tapi file
...
This avoids mixing preads with reads which do not mix well especially
on Windows.
2024-07-23 10:33:02 +02:00
Andrew Kelley
8a8a7ba35b
Merge pull request #20733 from alexrp/start-porting
...
`start`: Add startup code for loongarch64, m68k, and s390x
2024-07-22 18:25:24 -07:00
Veikka Tuominen
05a8c4796f
Merge pull request #18962 from fifty-six/master
...
std.builtin.panic(uefi): usability improvements
2024-07-23 04:06:30 +03:00
Frank Denis
d2c9a51d1e
Fix function definition: ChaCha20With64BitNonce counter is u64 ( #20734 )
...
Fixes #20732
2024-07-22 23:04:32 +00:00
Andrew Kelley
61ad1be6bd
fix macho linker integration with libfuzzer
2024-07-22 14:26:17 -07:00
Andrew Kelley
1cb994899d
Compilation: fix regression in addCCArgs
...
`-fno-sanitize=function` must come after `-fsanitize=undefined` or it
has no effect.
2024-07-22 14:26:17 -07:00
Andrew Kelley
ae09f9bbce
std.mem: delete workaround now that zig1.wasm is updated
2024-07-22 14:26:17 -07:00
Andrew Kelley
af7b6713d9
update zig1.wasm
2024-07-22 14:26:17 -07:00
Andrew Kelley
dbbe2f1094
libfuzzer: log all the libcalls to stderr
2024-07-22 14:26:17 -07:00
Andrew Kelley
105b91d30f
ZigLLVMTargetMachineEmitToFile: make sancov enable the options
2024-07-22 14:26:17 -07:00
Andrew Kelley
bde8c4a46a
update start code to use @disableInstrumentation
...
This prevents it from trying to access thread local storage before it
has set up thread local storage, particularly when code coverage
instrumentation is enabled.
2024-07-22 14:26:17 -07:00
Andrew Kelley
25198810c8
add new builtin: @disableInstrumentation
...
This is needed to ensure that start code does not try to access thread
local storage before it has set up thread local storage.
2024-07-22 13:07:02 -07:00
Andrew Kelley
7930efc60b
libfuzzer: implement enough symbols for hello world
2024-07-22 13:07:02 -07:00
Andrew Kelley
b9225aea78
add libfuzzer to linking
2024-07-22 13:07:02 -07:00
Andrew Kelley
7802cf9814
avoid depending on a zig1.wasm update
2024-07-22 13:07:02 -07:00
Andrew Kelley
1741b821c3
add the build system API for enabling fuzzing
2024-07-22 13:07:02 -07:00
Andrew Kelley
54b7e144b1
initial support for integrated fuzzing
...
* Add the `-ffuzz` and `-fno-fuzz` CLI arguments.
* Detect fuzz testing flags from zig cc.
* Set the correct clang flags when fuzz testing is requested. It can be
combined with TSAN and UBSAN.
* Compilation: build fuzzer library when needed which is currently an
empty zig file.
* Add optforfuzzing to every function in the llvm backend for modules
that have requested fuzzing.
* In ZigLLVMTargetMachineEmitToFile, add the optimization passes for
sanitizer coverage.
* std.mem.eql uses a naive implementation optimized for fuzzing when
builtin.fuzz is true.
Tracked by #20702
2024-07-22 13:07:02 -07:00
Andrew Kelley
eac7fd4da5
Merge pull request #20556 from McSinyx/setpgid
...
Allow setting PGID in std.process.Child.spawn
2024-07-22 11:17:18 -07:00
Jakub Konka
7c37c55161
macho: fix 32bit compilation issues
2024-07-22 17:32:43 +02:00
Yusuf Bham
22d964fe22
std.builtin.panic(uefi): stack allocate panic message
...
In the case that the allocator is unavailable (OOM, etc.), we can
possibly still output the panic message - so now we stack allocate the
message and copy it to the exit data for passing to boot services.
2024-07-22 16:23:10 +03:00
Yusuf Bham
c16aeda8a6
std.builtin.panic(uefi): also output to con_out
2024-07-22 16:23:10 +03:00
Alex Rønne Petersen
8ffc41f747
start: Add POSIX s390x startup code.
2024-07-22 14:39:55 +02:00
Alex Rønne Petersen
c53673276b
start: Add POSIX loongarch64 startup code.
2024-07-22 14:39:55 +02:00
Alex Rønne Petersen
1fa5ca24fe
start: Add POSIX m68k startup code.
2024-07-22 14:39:55 +02:00
Alex Rønne Petersen
142209444a
start: Pass _start() into its own inline asm as an operand.
2024-07-22 14:39:53 +02:00
Jakub Konka
8541119e9b
macho: handle empty string in ZigObject.getString
2024-07-22 13:35:55 +02:00
Jakub Konka
96fa29b90f
macho: write sections in parallel in -r mode
2024-07-22 12:06:02 +02:00
Jakub Konka
7e5a2673ac
macho: calc section sizes in parallel in -r mode
2024-07-22 12:06:02 +02:00
Jakub Konka
06a0da3e8a
macho: cache string len
2024-07-22 12:06:02 +02:00
Jakub Konka
79fefec599
add more tracy hooks
2024-07-22 12:06:02 +02:00
Jakub Konka
59733374ed
build: bump max_rss since we link MachO in parallel now
2024-07-22 12:06:02 +02:00
Jakub Konka
2b84592858
macho: run more things in parallel
2024-07-22 12:06:02 +02:00
Jakub Konka
5d9fd5bcde
macho: remove stale code
2024-07-22 12:06:02 +02:00
Jakub Konka
617f89f082
macho: parse input files in parallel
2024-07-22 12:06:02 +02:00
Jakub Konka
cba3389d90
macho: redo input file parsing in prep for multithreading
2024-07-22 12:05:56 +02:00
David Rubin
1fc42ed3e7
riscv: disable failing test
2024-07-22 05:58:59 -04:00
Andrew Kelley
b149d8f747
Merge pull request #20718 from alexrp/start-gv
...
`start`: Avoid going through the argc_argv_ptr global variable
2024-07-22 00:24:50 -07:00
Nguyễn Gia Phong
759ab41d72
Allow setting PGID in std.process.Child.spawn
2024-07-22 11:50:00 +09:00
Nguyễn Gia Phong
d6fa71cd67
std: Wrap setpgid on POSIX
2024-07-22 11:49:55 +09:00
Andrew Kelley
179a6e61e8
Merge pull request #20708 from alexrp/target-cleanup-2
...
`std.Target`: Remove more dead architecture tags.
2024-07-21 19:24:04 -07:00
Andrew Kelley
956ba8f61c
bootstrap.c: update version
2024-07-21 18:32:37 -07:00
Wooster
600e96f450
debug: correct dump_hex and dump_hex_fallible casing ( #19296 )
...
#1097 is closed.
2024-07-22 00:00:08 +00:00
Bogdan Romanyuk
42d9017feb
Sema: fix OOB access in coerceTupleToStruct ( #19620 )
...
Co-authored-by: Veikka Tuominen <git@vexu.eu>
2024-07-21 23:56:04 +00:00
Alex Rønne Petersen
81232f7c91
start: Add clrrdi to align the stack pointer on powerpc64.
2024-07-22 01:23:04 +02:00
Alex Rønne Petersen
7bc78967b4
start: Fix _start() to initialize the ToC for powerpc64.
...
The previous version of this function referenced the argc_argv_ptr global
variable as an inline asm operand. This caused LLVM to generate prologue code to
initialize the ToC so that the global variable can actually be accessed.
Ordinarily, there's nothing wrong with that. But _start() is a naked function!
This makes it actually super surprising that LLVM did this. It also means that
the old version only really worked by accident.
Once the reference to the global variable was removed, no ToC was set up, thus
violating the calling convention once we got to posixCallMainAndExit(). This
then caused any attempt to access global variables here to crash - namely when
setting std.os.linux.elf_aux_maybe.
The fix is to just initialize the ToC manually in _start().
2024-07-22 01:22:47 +02:00
Alex Rønne Petersen
be9841335e
std.Target.Os: Rename lv2 to ps3.
...
It is very non-obvious that this is what lv2 refers to, and we already use ps4
and ps5 to refer to the later models, so let's just be consistent.
2024-07-21 22:38:30 +02:00