17 Commits

Author SHA1 Message Date
Linus Groh
8588964972 Replace deprecated default initializations with decl literals 2024-09-12 16:01:23 +01:00
Andrew Kelley
e3f58bd551 add runs per second to fuzzing ui
closes #21025
2024-09-11 19:53:29 -07:00
Andrew Kelley
2d005827b8 make lowest stack an internal libfuzzer detail
This value is useful to help determine run uniqueness in the face of
recursion, however it is not valuable to expose to the fuzzing UI.
2024-09-11 13:41:29 -07:00
Andrew Kelley
0cdccff519 fuzzer: move web files into separate directory 2024-09-11 13:41:29 -07:00
Andrew Kelley
13b5cee4cc fuzzing: fix entry address logic
* the pcs list is unsorted
* use the function address

Fixes entry points in ReleaseSafe mode.
2024-08-28 18:07:13 -07:00
Andrew Kelley
9848318725 fix autodocs regression FTBFS
regressed in dffc8c44f9a01aa05ea364ffdc71509d15bc2601 since there is no
test coverage for the `zig std` command yet.

closes #21180
2024-08-23 19:23:38 -07:00
Robin Voetter
43f73af359
fix various issues related to Path handling in the compiler and std
A compilation build step for which the binary is not required could not
be compiled previously. There were 2 issues that caused this:

- The compiler communicated only the results of the emitted binary and
  did not properly communicate the result if the binary was not emitted.

  This is fixed by communicating the final hash of the artifact path (the
  hash of the corresponding /o/<hash> directory) and communicating this
  instead of the entire path. This changes the zig build --listen protocol
  to communicate hashes instead of paths, and emit_bin_path is accordingly
  renamed to emit_digest.

- There was an error related to the default llvm object path when
  CacheUse.Whole was selected. I'm not really sure why this didn't manifest
  when the binary is also emitted.

  This was fixed by improving the path handling related to flush() and
  emitLlvmObject().

In general, this commit also improves some of the path handling throughout
the compiler and standard library.
2024-08-19 19:09:11 +02:00
Igor Anić
72bcc3b7a5
std.tar: add writer (#19603)
Simplifies code in docs creation where we used `std.tar.output.Header`.
Writer uses that Header internally and provides higher level interface.
Updates checksum on write, handles long file names, allows setting mtime and file permission mode. Provides handy interface for passing `Dir.WalkerEntry`.
2024-08-15 22:05:53 -07:00
Andrew Kelley
72768bddcd std.Build.Fuzz.WebServer: sort pcs before source location lookup
Unfortunately, the PCs do not get sorted during linking.
2024-08-13 19:30:22 -07:00
Andrew Kelley
a9e7fb0e01 avoid a branch in resolveAddressesDwarf 2024-08-13 15:02:53 -07:00
Andrew Kelley
f6f1ecf0f9 more optimized and correct management of 8-bit PC counters
* Upgrade from u8 to usize element types.
  - WebAssembly assumes u64. It should probably try to be target-aware
    instead.
* Move the covered PC bits to after the header so it goes on the same
  page with the other rapidly changing memory (the header stats).

depends on the semantics of accepted proposal #19755

closes #20994
2024-08-08 21:46:36 -07:00
Andrew Kelley
4e32edbff5 fuzzing: comptime assertions to protect the ABI
compile errors are nice
2024-08-08 21:46:36 -07:00
Andrew Kelley
4381bac792 build runner: output hint when no --port provided 2024-08-07 16:55:46 -07:00
Andrew Kelley
8dae629c4f update branch for latest std.sort changes 2024-08-07 00:48:32 -07:00
Andrew Kelley
bfc2ee03e5 fuzzer web ui: resolve cwd in sources.tar
because the wasm code needs to string match against debug information
2024-08-07 00:48:32 -07:00
Andrew Kelley
e64a00950e fuzzer web ui: introduce entry points
so you can have somewhere to start browsing
2024-08-07 00:48:32 -07:00
Andrew Kelley
dec7e45f7c fuzzer web UI: receive coverage information
* libfuzzer: track unique runs instead of deduplicated runs
  - easier for consumers to notice when to recheck the covered bits.
* move common definitions to `std.Build.Fuzz.abi`.

build runner sends all the information needed to fuzzer web interface
client needed in order to display inline coverage information along with
source code.
2024-08-07 00:48:32 -07:00