2707 Commits

Author SHA1 Message Date
Andrew Kelley
a3c74aca99 add --debug-rt CLI arg to the compiler + bonus edits
The flag makes compiler_rt and libfuzzer be in debug mode.

Also:
* fuzzer: override debug logs and disable debug logs for frequently
  called functions
* std.Build.Fuzz: fix bug of rerunning the old unit test binary
* report errors from rebuilding the unit tests better
* link.Elf: additionally add tsan lib and fuzzer lib to the hash
2024-07-25 18:52:21 -07:00
Andrew Kelley
26d2a7960e default "trace pc guard" coverage off
* Add -f(no-)sanitize-coverage-trace-pc-guard CLI flag which defaults to
  off. This value lowers to TracePCGuard = true (LLVM backend) and -Xclang
  -fsanitize-coverage-trace-pc-guard. These settings are not
  automatically included with -ffuzz.
* Add `Build.Step.Compile` flag for sanitize_coverage_trace_pc_guard
  with appropriate documentation.
* Add `zig cc` integration for the respective flags.
* Avoid crashing in ELF linker code when -ffuzz -femit-llvm-ir used
  together.
2024-07-23 17:30:53 -07:00
Jakub Konka
7aaebd1774
Merge pull request #20751 from Rexicon226/riscv-eflags
elf: add riscv eflag collisions
2024-07-23 22:29:57 +02: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
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
David Rubin
782a9d16c7
elf: add riscv eflag collisions 2024-07-22 18:01:26 -07:00
Andrew Kelley
61ad1be6bd fix macho linker integration with libfuzzer 2024-07-22 14:26:17 -07:00
Andrew Kelley
b9225aea78 add libfuzzer to linking 2024-07-22 13:07:02 -07:00
Jakub Konka
7c37c55161 macho: fix 32bit compilation issues 2024-07-22 17:32:43 +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
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
sobolevn
4c71d3f29e
Fix typos in code comments in src/ 2024-07-20 20:23:18 +03:00
Jacob Young
5424239154 dev: add missing x86_64 backend checks 2024-07-20 07:43:53 -04:00
Jacob Young
2e65244cae dev: fix llvm backend checks 2024-07-20 07:43:40 -04:00
Jacob Young
4f742c4cfc dev: introduce dev environments that enable compiler feature sets 2024-07-19 22:35:33 -07:00
Andrew Kelley
8c4a2dc1df move non-libc stuff out of std.c 2024-07-19 00:30:32 -07:00
Jakub Konka
3bdbf81a3f macho: fix emitting data-in-code entries 2024-07-18 09:13:09 +02:00
Jakub Konka
34f34dbe32 macho: reinstate duplicate definition checking 2024-07-18 09:13:09 +02:00
Jakub Konka
b339a30680 macho: fix off-by-one when populating strtab 2024-07-18 09:13:09 +02:00
Jakub Konka
e9328e7da8 macho: fix 32bit compilation issues 2024-07-18 09:13:09 +02:00
Jakub Konka
3338813077 macho: use isec for working out getAtomData in ZigObject 2024-07-18 09:13:09 +02:00
Jakub Konka
a9e3088d9c macho: extract testing logic for TLS into a helper 2024-07-18 09:13:08 +02:00
Jakub Konka
103c16c879 macho: clean up atom+symbol creation logic in ZigObject 2024-07-18 09:13:08 +02:00
Jakub Konka
e117e05768 macho: ensure we always name decls like LLVM to avoid confusion 2024-07-18 09:13:08 +02:00
Jakub Konka
91de8dc8ab macho: fix unresolved symbols error reporting 2024-07-18 09:13:08 +02:00
Jakub Konka
521933e1c0 macho: do not randomly append non-incr atoms in ZigObject 2024-07-18 09:13:08 +02:00
Jakub Konka
234aa86802 macho: update non-incremental section sizes for ZigObject sections 2024-07-18 09:13:08 +02:00
Jakub Konka
387a71fa5b macho: re-enable writing out static archive with ZigObject 2024-07-18 09:13:08 +02:00
Jakub Konka
84189f9d56 macho: skip resizing incremental Zig sections in r mode 2024-07-18 09:13:08 +02:00
Jakub Konka
129fe8668c macho: write non-incremental atoms in ZigObject 2024-07-18 09:13:08 +02:00
Jakub Konka
e5a66184ed macho: pretty print relocation types in logs and errors 2024-07-18 09:13:08 +02:00
Jakub Konka
01fc33c949 macho: emit relocs for non-zig-sections in ZigObject 2024-07-18 09:13:08 +02:00
Jakub Konka
853ca403c4 macho: bring back relocatable mode for ZigObject 2024-07-18 09:13:08 +02:00
Jakub Konka
cba04ff244 macho: re-enable calculating num of relocs for ZigObject 2024-07-18 09:13:08 +02:00
Jakub Konka
2579c55d49 macho: adjust global creation in ZigObject to new model 2024-07-18 09:13:08 +02:00
Jakub Konka
4aff0ec394 macho: move relocs re-resolution logic to ZigObject 2024-07-18 09:13:08 +02:00
Jakub Konka
b62281a9c8 macho: re-enable relocatable mode 2024-07-18 09:13:08 +02:00
Jakub Konka
90c54f1eb6 macho: fix symbol visibility merging logic 2024-07-18 09:13:08 +02:00
Jakub Konka
3d58faed12 macho: we do not yet support interposable symbols 2024-07-18 09:13:08 +02:00
Jakub Konka
b4e6b3c53c macho: bring back parts of r mode 2024-07-18 09:13:08 +02:00
Jakub Konka
05a790d784 macho: link hello world in zig compiled with llvm 2024-07-18 09:13:08 +02:00
Jakub Konka
18778e2a0a macho: bring back parts of ar 2024-07-18 09:13:08 +02:00
Jakub Konka
174de37cef macho: fix compile errors 2024-07-18 09:13:08 +02:00