[libc] Implement fdatasync (#225613)
This patch implements the fdatasync entry point for Linux, matching the
existing fsync implementation. I'm adding it to all supported Linux
architectures (x86_64, aarch64, arm, and riscv), where it's backed by
the SYS_fdatasync syscall.
Assisted-by: Gemini
[libc] Migrate filesystem syscall wrappers to syscall_checked (#225636)
Migrate a batch of related filesystem/path syscall wrappers to use
syscall_checked instead of manual syscall_impl error checking.
While in there:
- update file headers to the new style
- reformat includes into a single block so clang-format can sort them
Assisted-by: Gemini
[mlir][ODS] Optimize generated assembly printers for size
Favor smaller code for declarative assembly printers. The OpenMP TU uses
1.8% fewer compiler instructions and emits 37 KB less text on top of the
shared interface change. Printing is not performance sensitive.
Assisted-by: Codex
interfaces: offload $legacybools and $legacyempties to NetworkInterface model; closes #10918
So we can fix the mocked $config apply in apply_pending_if_changes.php.
Ideally, toLegacy() should already do this and we just replace the whole
interface section in the script.
[mlir] Match diagnostic string vector return type (#226011)
Match the local `SmallVector<std::string>` type to
`Diagnostic::strs()`'s declared return type.
Fix the build on some platform/toolchains.
Assisted by: codex
[lldb] Fix heap-buffer-overflow in tree-sitter-swift scanner state (#224001)
Running the `HighlighterTests` unit test under AddressSanitizer aborts
on every Swift test case, for example `SwiftComments`:
```
==69424==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000008070 at pc 0x000116a1f36c bp 0x00016d07c3c0 sp 0x00016d07c3b8
READ of size 4 at 0x602000008070 thread T0
#0 0x000116a1f368 in eat_raw_str_part scanner.c:700
#1 0x000116a1b5f4 in tree_sitter_swift_external_scanner_scan scanner.c:858
#2 0x00012cc77420 in ts_parser_parse
#3 0x00012cc79afc in ts_parser_parse_string
#4 0x00010a3536a4 in lldb_private::TreeSitterHighlighter::Highlight(...)
0x602000008071 is located 0 bytes after 1-byte region [0x602000008070,0x602000008071)
allocated by thread T0 here:
#0 0x00012d68d560 in calloc
#1 0x00012cc763b8 in ts_parser_parse
#2 0x00012cc79afc in ts_parser_parse_string
[21 lines not shown]
[WebKit Checkers] Add alpha.webkit.UnborrowedCallArgsChecker (#225854)
Like alpha.webkit.UnborrowedLocalVarsChecker, but for function
arguments.
As in the local variable checker, we do not treat an origin that
outlives a function call as sufficient evidence of safety. We need to
prove not only that an object is live, but also that it prevents
interior destruction.
Assisted-by: Claude
loader.efi: Be cautious about using GOPs
When we're searching for the EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID (GOPs) to
use, skip any whose Mode or Mode->Info pointers are NULL. The spec
requires these to be non-null, however, some firmwares seem to fail to
populate the Info when, for example, a monitor is not present. Work
around these bugs by skipping any GOPs with bad pointers.
PR: 288900
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D59830
AMDGPU: Mark the carry-out of the scalar abs expansion dead
lowerScalarAbs and lowerScalarAbsDiff build V_SUB_CO_U32_e32 on targets
without the carry-less add/sub instructions. The carry-out is never read,
but it was left without a dead flag. Fix the missing flag to reduce
implicit dependence on LiveVariables introducing dead flags.
Co-Authored-By: Claude Opus 5 <noreply at anthropic.com>
tor: update to 0.4.9.13.
Changes in version 0.4.9.13 - 2026-09-23
This security release includes several high severity fixes, once again
originating from the LLM report firehose. The fixes affect all Tor
components: relays, clients, and onion services. We strongly recommend
upgrading as soon as possible.
o Major bugfixes (security):
- Avoid a set of possible memory corruption, double-free, and null
pointer dereference bugs that could occur with some reverse DNS
virtual address configurations. Fixes bug 41381; bugfix on
0.1.0.1-rc. Tracked as TROVE-2026-051.
- Avoid cacheing DNS PTR responses when DNS caching is disabled.
Previous code to prevent this caching parsed the response
addresses incorrectly, and defaulted to caching when the address
could not be parsed. Fixes bug 41380; bugfix on 0.2.4.7-alpha.
Tracked as TROVE-2026-050.
[100 lines not shown]
[mlir][LLVMIR] Fix a crash when `llvm.mlir.constant` fails to create an LLVM constant. (#224951)
Fix the `llvm.mlir.constant` translation to handle a failed
`getLLVMConstant()` conversion. The current code can pass a null
`llvm::Value` to users of the constant, causing an assertion. Check the
result of `getLLVMConstant()` and return failure when the conversion
fails.
Fixes #224815
[docs] Fix PDB serialized hash table on-disk format description (#225889)
Fixes #76602
Updating HashTable.md to match how the PDB hash table format is
serialized according to the microsoft-pdb repository:
https://github.com/microsoft/microsoft-pdb/blob/805655a28bd8198004be2ac27e6e0290121a5e89/PDB/include/map.h#L584
The key/value list contains Size entries rather than Capacity entries,
and the present bit vector identifies which bucket each pair belongs to.
AMDGPU: Invalidate VCC live ranges when lowering kill instructions
lowerKillInstr replaces the kill pseudo with a v_cmp defining VCC plus
two instructions reading it, but left any previously computed VCC
regunit ranges alone. If something had already materialized them, the
new uses have no live segment:
*** Bad machine code: No live segment at use ***
- instruction: $exec = S_ANDN2_B64_term $exec, $vcc, implicit-def $scc
Drop the ranges so they are recomputed on demand, as is already done for
EXEC and SCC.
Co-Authored-By: Claude Opus 5 <noreply at anthropic.com>
[Local] Preserve !callees when merging calls (#225307)
When `SimplifyCFG` hoists or sinks two calls, `combineMetadata` drops `!callees`
even if both calls have it. Take the union of the lists when the retained
call moves, since it must allow the targets of either call. If either call
has no `!callees`, drop it from the merged call. For CSE, keep the list on
the call that stays in place.
loader.efi: Use EfiLoaderData memory type for ram disks
For the images we read into the memory, use EfiLoaderData memory type
instead of EfiReservedMemoryType. The kernel handles the former properly
and won't reallocate it. While the latter isn't necessarily mapped,
which can cause ram disks to fault when loaded. memdisk_uefi.efi
used the latter type, but also registered the device as an ACPI
RAM disk, which we don't do.
Fixes: afee781523e45
Sponsored by: Netflix
[ORC] Re-rename eh-frame alloc actions. (#226038)
Use 'Section' as the suffix rather than 'Frame' to make clear that these
actions register whole sections at a time. This aligns eh-frame
registration action names with the MachO unwind info registration action
names.
An ORC runtime commit implementing these actions will land as a
follow-up commit.
RegisterCoalescer: Don't mark a remat def dead when the copy destination covers it
When rematerializing into a physical register that is not exactly the copy's
destination, reMaterializeDef marks the rematerialized def dead and adds an
implicit-def of the copy destination. That is only correct when the rematerialized
instruction defines more than the copy asked for, so the extra part really is unused.
It is wrong when the def is covered by the copy destination, since then it is
part of that live value:
undef %0.sub_32bit:gr64 = MOV32ri -11
$rax = COPY %0
; coalesces to
dead $eax = MOV32ri -11, implicit-def $rax
$eax is the live low half of $rax, so it must not be dead. Only set the dead
flag when the def has register units the copy destination does not cover.
This makes the dead flags consistent with what LiveVariables would produce
[3 lines not shown]
CodeGen: Suppress per-invoke EH labels via an MCAsmInfo object predicate (#225903)
This is to avoid depending on TargetOptions::ExceptionModel in the
X86ISelLowering constructor. This was used to legalize EH_LABEL to a
nop. Legality rules cannot depend on program state, and the exception model
should be read from the IR module flag. In this instance the exception model
isn't really the relevant property. The specific personality and the target
object's EH table format are. Introduce a new MCAsmInfo predicate which
is a known constant for the triple. Also just do this during the initial label
emission instead of leaving it to legalization. This cleans up some unused
labels for wasm. This is also a minor behavior change for unknown
personalities; the labels will now be conservatively emitted.
I don't know all that much about exceptions, there's a lot of AI reverse
engineering of intent here. Another bruteforce approach would be to just
relocate the current condition to the selector which has access to the
exception model, but the MCAsmInfo check will be reusable in other
contexts.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>