33048 Commits

Author SHA1 Message Date
tjog
3ca0f18bfe
fuzz: fix expected section start/end symbol name on MacOS when linking libfuzzer
Not only is the section name when adding the sancov variables different.

The linker symbol ending up in the binary is also different.

Reference: 60105ac6ba/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp (L1076-L1104)
2025-04-26 15:07:21 +02:00
Alex Rønne Petersen
a8844ab3bc
std.Target.amdgcn.cpu.gfx1153 doesn't exist in LLVM 19. 2025-04-25 20:14:44 +02:00
Ryan Liptak
aa013b7643
FailingAllocator: remove outdated doc comments, move doc comment example to decltest
Note: The decltests for files-as-a-struct don't show up in autodoc currently
2025-04-25 19:58:11 +02:00
Ali Cheraghi
f38a28a626
revive nvptx linkage 2025-04-25 19:57:45 +02:00
Ali Cheraghi
af6670c403
Module: ignore xnack and sramecc features on some gpu models 2025-04-25 19:57:39 +02:00
Pavel Otchertsov
fd7aafdbd5
cmake: support static linking against libxml2 2025-04-16 23:40:28 +02:00
phatchman
4b47e978e3
Return FileNotFound when CreateProcessW is called with a missing path (#23567) 2025-04-16 04:25:02 +02:00
David Rubin
d80cfa6f41 Compilation: Use trapping UBSan if -fno-ubsan-rt is passed.
This is a mitigation of #23216 meant only for 0.14.x.
2025-04-15 21:29:10 +02:00
Alex Rønne Petersen
379f1c9fa0
std.Build.Step: Don't capture a stack trace if !std.debug.sys_can_stack_trace. 2025-04-15 01:30:52 +02:00
Alex Rønne Petersen
c0378e85b6
link: Improve handling of --build-id when using LLD. 2025-04-15 01:30:34 +02:00
Luis Cáceres
ebb37e719d
src/libunwind.zig: Fix symbol visibility macro define
The define was changed in commit 729899f7b6bf6aff65988d895d7a639391a67608
in upstream llvm.
2025-04-15 01:30:27 +02:00
kcbanner
527df938e1
Value: ensure that extern structs have their layout resolved in ptrField 2025-04-11 21:35:42 +02:00
Jacob Young
1d34616236
x86_64: fix error_set_has_value of inferred error sets 2025-04-11 16:59:55 +02:00
Alex Rønne Petersen
a5f4107d3e
Compilation: Pass -m<os>-version-min=... to Clang for all applicable Darwin targets. 2025-04-11 02:19:22 +02:00
Pat Tullmann
2a7683933a
linux.zig: epoll_wait: pass kernel sigset size
Linux kernel syscalls expect to be given the number of bits of sigset that
they're built for, not the full 1024-bit sigsets that glibc supports.

I audited the other syscalls in here that use `sigset_t` and they're all
using `NSIG / 8`.

Fixes #12715
2025-04-10 10:49:04 +02:00
Techatrix
83e1ce1e00
Compilation: Fix logic in addCCArgs() for various file types and flags.
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2025-04-09 15:04:24 +02:00
Meghan Denny
9397dc5af6
std: add nvidia as a known arm implementer 2025-04-09 15:03:45 +02:00
SuperAuguste
4ab34b142e
Fix mach-o naming for sancov sections 2025-04-09 15:03:17 +02:00
Matthew Roush
fbb297fd2a
Make translate-c more robust in handling macro functions.
Translate-c didn't properly account for C macro functions having parameter names that are C keywords. So something like `#define FOO(float) ((float) + 10)` would've been interpreted as casting `+10` to a `float` type, instead of adding `10` to the parameter `float`.

An example of a real-world macro function like this is SDL3's `SDL_DEFINE_AUDIO_FORMAT` from `SDL_audio.h`, which uses `signed` as a parameter.
2025-04-08 12:11:30 +02:00
Stefan Weigl-Bosker
8bb7c85bd4
start: fix pc register syntax for m68k 2025-04-08 12:10:22 +02:00
Alex Rønne Petersen
79e3c4a9a8
start: Align the stack on m68k. 2025-04-08 12:10:16 +02:00
SuperAuguste
60922dbf34
Remove overzealous LLVM anti-instrumentation attributes 2025-04-07 12:06:26 +02:00
Alex Rønne Petersen
b2feb0d575
glibc: Add missing stubs-lp64s.h for loongarch64-linux-gnusf.
https://sourceware.org/bugzilla/show_bug.cgi?id=32776
2025-04-06 17:23:19 +02:00
Ziyi Yan
a100419d06
Add lld path of linuxbrew installation (#23466)
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2025-04-06 09:11:15 +02:00
Jacob Young
cf6c8eacfe Dwarf: handle undefined type values
Closes #23461
2025-04-06 00:56:57 -04:00
Jacob Young
cac0f56c03 x86_64: fix incorrect handling of unreusable operands
Closes #23448
2025-04-06 00:56:44 -04:00
Zenomat
a2ea4b02bc
std.net: Implement if_nametoindex for windows (#22555) 2025-04-05 20:41:50 +02:00
Dimitris Dinodimos
dac350f7c8
Change the lld path on macos homebrew
Homebrew now provides lld in a separate formula; it was part of llvm
formula.
2025-04-04 06:06:28 +02:00
Alex Rønne Petersen
1bada4b275
Merge pull request #23447 from alexrp/cpuid-updates 2025-04-03 19:32:59 +02:00
Alex Rønne Petersen
f5de2770e5
Merge pull request #23445 from alexrp/external-executor-fixes 2025-04-03 19:32:54 +02:00
Misaki Kasumi
d128f5c0bb
std.os.linux: block all signals in raise 2025-04-02 23:57:32 +02:00
Parker Liu
06fc600aec
translate-c: fix function prototype decalared inside a function
* If a function prototype is declarated inside a function, do not
  translate it to a top-level extern function declaration. Similar to
  extern local variable, just wrapped it into a block-local struct.

* Add a new extern_local_fn tag of aro_translate_c node for present
  extern local function declaration.

* When a function body has a C function prototype declaration, it adds
  an extern local function declaration. Subsequent function references
  will look for this function declaration.
2025-04-02 23:56:07 +02:00
Auguste Rame
0b4176891c
DebugAllocator: Fix bucket removal logic causing segfault/leak (#23390)
Make buckets doubly linked
2025-04-02 14:22:15 +02:00
mlugg
ceb84c647b
stage1: fix wasi_snapshot_preview1_fd_seek on cache files
`wasm2c` uses an interesting mechanism to "fake" the existence of cache
directories. However, `wasi_snapshot_preview1_fd_seek` was not correctly
integrated with this system, so previously crashed when run on a file in
a cache directory due to trying to call `fseek` on a `FILE *` which was
`NULL`.
2025-04-02 14:21:56 +02:00
Mason Remaley
4089134892
Zcu: fix ZOIR cache bugs
* When saving bigint limbs, we gave the iovec the wrong length, meaning
  bigint data (and the following string and compile error data) was corrupted.
* When updating a stale ZOIR cache, we failed to truncate the file, so
  just wrote more bytes onto the end of the stale cache.
2025-04-02 14:21:51 +02:00
David Rubin
f2c838d2cf
Sema: increment extra index even if return type is generic 2025-04-02 08:43:28 +02:00
Ali Cheraghi
edaa9584cc
zon: normalize negative zeroes 2025-04-02 08:43:21 +02:00
mlugg
f5e7850686
Sema: allow @ptrCast slice of zero-bit type to slice of non-zero-bit type
This is actually completely well-defined. The resulting slice always has
0 elements. The only disallowed case is casting *to* a slice of a
zero-bit type, because in that case, you cna't figure out how many
destination elements to use (and there's *no* valid destination length
if the source slice corresponds to more than 0 bits).
2025-04-02 08:43:13 +02:00
Parker Liu
6ecd143212
translate-c: fix referencing extern locals from nested blocks 2025-04-02 08:43:13 +02:00
Jacob Young
373ae980c0 Elf: fix incrementally reallocating the last atom in a section 2025-03-31 23:18:38 -04:00
Alex Rønne Petersen
b8d7866193
Merge pull request #23371 from alexrp/ci-redundancy
Remove some `aarch64-linux` CI steps that are already covered by `x86_64-linux`
2025-03-31 17:52:34 +02:00
Alex Rønne Petersen
4c0913ff7c
Merge pull request #23417 from dweiller/zstd-fixes
Zstd fixes
2025-03-31 17:52:23 +02:00
Simon Brown
e5ea175ffb
Add quota for comptime sort, add test 2025-03-31 17:52:16 +02:00
David Rubin
aca8ed9dec
Sema: convert slice sentinel to single pointer correctly 2025-03-31 17:36:45 +02:00
mlugg
6ac462b088
Zcu: resolve layout of analyzed declaration type
Resolves: #19888
2025-03-31 17:36:44 +02:00
Sean Stasiak
9025f73733
check result of mmap() call to handle a large base_addr value correctly 2025-03-27 21:08:23 +01:00
Alex Rønne Petersen
1423b38c45
Merge pull request #23378 from alexrp/build-zig-cleanup 2025-03-27 21:08:10 +01:00
Alex Rønne Petersen
ed6418544c
Merge pull request #23373 from alexrp/get-base-address
`std.process`: Some minor fixes for `getBaseAddress()`
2025-03-27 21:08:04 +01:00
Alex Rønne Petersen
3ae9a99f62
build: increase test-std max rss 2025-03-27 12:19:16 +01:00
Андрей Краевский
8088105b05
std.meta.FieldType -> @FieldType 2025-03-27 12:19:07 +01:00