LLVM/project 20afa98 — clang/lib/Sema TreeTransform.h

[Clang][SYCL] Add a voided use of a variable used only in an assertion. (#247412)

The tree transform for UnresolvedSYCLKernelCallStmt contains a call to
SemaSYCL::GetSYCLKernelInfoClassSpecializationType() that is necessary
to provoke an implicit declaration of the requested specialization. The
return value is only used in an assertion which resulted in an unused
variable error in builds with assertions disabled. A voided use of the
variable has been added to suppress the error.
DeltaFile
+1-0clang/lib/Sema/TreeTransform.h
+1-01 files

FreeBSD/src dac7d81 — admin config.guess config.sub, api-docs/html a00043.html a00895.html

lutok: import lutok-0.7.1

This change adds lutok lutok-0.7.1 from upstream [1].

The lutok-0.7.1 artifact was been verified by SHA256 checksum [2].

This is a bugfix release.

The core issues addressed in this release relate to memory handling in edge
cases and a handful of build-related bugfixes found when enabling ASAN in CI.

A huge shoutout goes to @holmuk for the findings and fixes made in the library.

Users are encouraged to upgrade to this release.

More information about the release (from a high level) can be found in
the release notes [3].

Updated with [4] like: `update_lutok.sh 0.7.1 lutok-0.7.1`.

    [5 lines not shown]
DeltaFile
+1,490-927admin/config.sub
+0-1,693api-docs/html/a00923.html
+947-604admin/config.guess
+1,163-0api-docs/html/navtree.js
+0-532api-docs/html/a00895.html
+403-0api-docs/html/a00043.html
+4,003-3,756179 files not shown
+8,728-11,558185 files

FreeBSD/src 9e2097a — . configure Makefile.in, admin config.guess config.sub

atf: import atf-0.27.0

This change adds atf atf-0.27.0 from upstream [1].

The atf-0.27.0 artifact was been verified by SHA256 checksum [2].

This is a minor bugfix release with the added feature for wchar_t equality
testing with atf-c(3) and `atf-check` negate support.  Both items were
contributed by des@.

More information about the release (from a high level) can be found in
the release notes [3].

Updated with [4] like: `update_atf.sh 0.27.0 atf-0.27.0`.

[1]: https://github.com/freebsd/atf/releases/download/atf-0.27.0/atf-0.27.0.tar.gz
[2]: https://github.com/freebsd/atf/releases/download/atf-0.27.0/atf-0.27.0.tar.gz.sha256
[3]: https://github.com/freebsd/atf/blob/atf-0.27.0/NEWS.md
[4]: https://codeberg.org/ngie/freebsd-powertools:shell/update_atf.sh@92e09e5b
DeltaFile
+1,490-927admin/config.sub
+947-604admin/config.guess
+816-0atf-sh/libatf-sh/common.subr
+386-333Makefile.in
+189-8atf-c/macros_test.c
+92-42configure
+3,920-1,91423 files not shown
+4,229-1,99429 files

LLVM/project b5fc07d — lld/ELF SyntheticSections.cpp OutputSections.cpp

[ELF] Finalize merge sections in parallel (#246841)

Finalizes merge sections and looks up tail-merged string offsets with
`parallelForEach`. The output is byte-identical at any `--threads`
value.

The gain comes from tail merging, which only happens at -O2 and above.
DeltaFile
+2-2lld/ELF/OutputSections.cpp
+2-1lld/ELF/SyntheticSections.cpp
+4-32 files

LLVM/project b4871b8 — llvm/lib/Target/AMDGPU AMDGPUAttributor.cpp, llvm/test/CodeGen/AMDGPU duplicate-attribute-indirect.ll simple-indirect-call.ll

[AMDGPU] Re-enable AAInstanceInfo in AMDGPUAttributor

This was enabled and then disabled because of its compile time impact. This
recent changes, the compile time issue should have been resolved.
DeltaFile
+13-5llvm/test/CodeGen/AMDGPU/amdgpu-attributor-accesslist-offsetbins-out-of-sync.ll
+3-6llvm/test/CodeGen/AMDGPU/simple-indirect-call-2.ll
+5-3llvm/test/CodeGen/AMDGPU/direct-indirect-call.ll
+4-2llvm/test/CodeGen/AMDGPU/simple-indirect-call.ll
+2-3llvm/test/CodeGen/AMDGPU/duplicate-attribute-indirect.ll
+1-1llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
+28-206 files

LLVM/project c128eb5 — flang/lib/Semantics compute-offsets.cpp, flang/test/Semantics equivalence-non-data-object.f90

[Flang] Avoid crash on invalid EQUIVALENCE objects (#244982)

An invalid EQUIVALENCE statement may introduce a symbol that is not a
data object into later offset computation. ComputeOffsetsHelper assumes
such symbols have ObjectEntityDetails when assigning COMMON block
information, which can cause a crash.

Check for ObjectEntityDetails before accessing object-specific
information.

Fixes https://github.com/llvm/llvm-project/issues/242269
DeltaFile
+16-0flang/test/Semantics/equivalence-non-data-object.f90
+3-1flang/lib/Semantics/compute-offsets.cpp
+19-12 files

LLVM/project 91e7e85 — llvm/lib/Transforms/IPO AttributorAttributes.cpp, llvm/test/Transforms/Attributor value-simplify-call-chain.ll

[Attributor] Do not copy large value sets in `AAPotentialValues`

`AAPotentialValuesImpl::recurseForValue` copies all values of another position
into the state. For example, if a callee returns one of its arguments, the call
result takes the values of the call site operand. In a chain of calls where each
call gets the result of the previous call, each call result then has one more
value than the previous one. A call result also sees the new values of the
previous call only in the next fixpoint iteration, so a chain of N calls needs N
iterations, and a long chain hits the iteration limit.

In this PR, we just limit the number of values to copy to 7, and use the value
of the position itself otherwise. 7 is a magic number here, but it is sufficient
for most cases (telling from the fact that no existing test is affected by this
change).

This PR was assisted by AI but I reviewed all the changes.
DeltaFile
+58-0llvm/test/Transforms/Attributor/value-simplify-call-chain.ll
+11-0llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+69-02 files

LLVM/project 4d401fb — llvm/lib/Transforms/IPO AttributorAttributes.cpp, llvm/test/Transforms/Attributor value-simplify-pointer-info.ll

[Attributor] Use call site values when the callee returns an argument

AAPotentialValuesCallSiteReturned takes the interprocedural values of a call
from the interprocedural return values of the callee. If the callee returns one
of its arguments, these values contain the arguments of all call sites, so each
call result also gets the values passed at all other call sites. This is not
necessary. If the callee has many call sites and the call results are passed to
other calls, the value sets also become very large.

If the callee returns only its arguments and constants, we just need to
translate these values to the call site for the interprocedural scope.

This PR was assisted by AI but I reviewed all the changes.
DeltaFile
+75-0llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll
+35-12llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+110-122 files

FreeBSD/ports 46ba5ee — devel/shedskin Makefile distinfo

devel/shedskin: update 0.9.14 → 1.0
DeltaFile
+3-3devel/shedskin/distinfo
+3-1devel/shedskin/Makefile
+6-42 files

FreeBSD/ports 76a2c08 — multimedia/vvdec pkg-plist Makefile

multimedia/vvdec: update 3.2.1 → 3.3.0
DeltaFile
+3-3multimedia/vvdec/distinfo
+1-1multimedia/vvdec/pkg-plist
+1-1multimedia/vvdec/Makefile
+5-53 files

FreeBSD/ports 2fb6abd — textproc/tgrep Makefile distinfo

textproc/tgrep: Update to 1.2.10

Changelog: https://github.com/microsoft/tgrep/releases/tag/v1.2.10

Reported by:    GitHub (watch releases)
DeltaFile
+3-3textproc/tgrep/distinfo
+1-1textproc/tgrep/Makefile
+4-42 files

LLVM/project 1a3580b — clang/include/clang/Sema SemaSYCL.h, clang/lib/Sema SemaDecl.cpp SemaSYCL.cpp

[Clang][SYCL] Call sycl_kernel_launch with a kernel info type rather than a kernel name type. (#208958)

Previously, implicit calls to the sycl_kernel_launch() function
provided by the SYCL runtime library passed a kernel name type as the
sole template argument and a name for the generated kernel entry point
function as a string literal for the first function argument. This
design had two issues:
- The name of the offload kernel entry point was only communicated to
the SYCL runtime library at run-time despite being known at
compile-time.
- The interface left little room for future extension.

With this change, a kernel information type that contains both the
kernel name type and the name of the offload kernel entry point as
members is passed as the sole template argument and there is no longer a
need to pass an implicit function argument. The kernel information type
has the following structure where kernel-info, kernel-name-type, and
kernel-entry-point-name are exposition only names.
  struct kernel-info {

    [18 lines not shown]
DeltaFile
+278-45clang/lib/Sema/SemaSYCL.cpp
+102-102clang/test/SemaSYCL/sycl-kernel-launch.cpp
+70-23clang/include/clang/Sema/SemaSYCL.h
+36-46clang/test/ASTSYCL/ast-dump-sycl-kernel-call-stmt.cpp
+32-37clang/test/CodeGenSYCL/kernel-caller-entry-point.cpp
+25-33clang/lib/Sema/SemaDecl.cpp
+543-28643 files not shown
+743-42849 files

FreeBSD/src 382da2d — sys/compat/linuxkpi/common/src linux_80211.h linux_80211.c

linuxkpi: set M_AMPDU for NICs that require host reordering

Set the M_AMPDU flag on RX packets for NICs that require host
reordering.

The reporter (Denis) sees a traffic increase from ~ 100Mbit/sec
to ~365Mbit/sec and a decrease in dropped frames due to RX
sequence / RX CCMP PN reordering.

PR: 300862
Obtained from: Denis Lemire <denis at lemire.name>
MFC after: 1 month
DeltaFile
+7-0sys/compat/linuxkpi/common/src/linux_80211.c
+1-0sys/compat/linuxkpi/common/src/linux_80211.h
+8-02 files

LLVM/project 171e58d — mlir/lib/Transforms/Utils CSE.cpp, mlir/test/Transforms cse-overlapping-reads.mlir cse-effects-cache.mlir

[mlir][CSE] Avoid repeated effect scans across overlapping read queries (#243707)

CSE caches scan progress separately for each starting read, so queries
with different starting operations repeatedly inspect overlapping
intervals. Maintain an incrementally populated, block-local index of
write and unknown-effect operations, with a per-read cursor into the
index. This avoids rescanning intervening operations that are known not
to write, while preserving resource-aware write checks and early exits
on blockers.

On the CLIP reproducer, this reduces intermediate-operation effect
checks from 2,590,482 to 7,483 with identical output. The regression
test is reduced from that input and adapted to upstream dialects.

Fixes #243418
DeltaFile
+75-82mlir/lib/Transforms/Utils/CSE.cpp
+118-0mlir/test/Transforms/cse.mlir
+50-0mlir/test/Transforms/cse-effects-cache.mlir
+38-0mlir/test/Transforms/cse-overlapping-reads.mlir
+281-824 files

FreeBSD/src 8802a76 — sys/netpfil/ipfw ip_fw2.c

ipfw: Destroy global state after the vnets on unload

A module's MOD_UNLOAD handler runs before any of its SYSUNINITs.  Since
ipfw_destroy() moved into MOD_UNLOAD, vnet_ipfw_uninit() runs after it
and takes locks that ipfw_destroy() has already destroyed: the sockopt
handler lock, and vnet_mtx in a vnet that tracks interfaces.  kldunload
ipfw panics with INVARIANTS:

panic: mtx_lock() of destroyed mutex @ sys/netpfil/ipfw/ip_fw_sockopt.c:3038
ipfw_del_sopt_handler() <- ipfw_destroy_tables() <- vnet_ipfw_uninit()
<- vnet_deregister_sysuninit() <- linker_file_sysuninit()
<- linker_file_unload()

Call ipfw_destroy() from a SYSUNINIT at SI_ORDER_FIRST instead, which
runs after the SI_ORDER_SECOND vnet teardown, as before 9bcc1e97dda8
and as pf does for pf_unload().

Reviewed by:            glebius
Fixes:                  9bcc1e97dda8 ("ipfw: cleanup SYSINIT(9)s")

    [2 lines not shown]
DeltaFile
+7-3sys/netpfil/ipfw/ip_fw2.c
+7-31 files

FreeBSD/src cfe07ee — sys/netpfil/ipfw ip_fw_nat.c, sys/netpfil/ipfw/nat64 ip_fw_nat64.c

ipfw: Run the vnet hooks of ipfw_nat, nat64 and nptv6 after ipfw's

9bcc1e97dda8 put the SYSINITs of ipfw_nat, ipfw_nat64 and ipfw_nptv6
at SI_ORDER_SECOND, the order of ipfw's own vnet hooks; before, they
ran after them.

In ipfw_nat, the module-wide hooks and the vnet hooks now share that
order too, which leaves their relative order to the sort.  As built,
kldunload ipfw_nat runs ipfw_nat_destroy() first: it clears
ipfw_nat_ptr and lookup_nat_ptr while every vnet still has
V_ipfw_nat_ready set, and a packet that hits a nat rule in between
calls a NULL pointer:

  (null)() at 0 <- ipfw_check_packet <- pfil_mbuf_in <- ip_input

Loading can open the same window the other way around.

The vnet hooks of all three modules also tie with ipfw's, and run after
them on vnet creation and before them on destruction only because ipfw

    [10 lines not shown]
DeltaFile
+6-2sys/netpfil/ipfw/ip_fw_nat.c
+3-2sys/netpfil/ipfw/nptv6/ip_fw_nptv6.c
+3-2sys/netpfil/ipfw/nat64/ip_fw_nat64.c
+12-63 files

FreeBSD/src 878fab6 — sys/netpfil/ipfw ip_fw2.c

ipfw: Drain the state expiry task before taking the upper half lock

vnet_ipfw_uninit() takes the upper half lock and then drains the task
that expires dynamic states.  Since 331333ba0186 that task, dyn_tick(),
takes the same lock, so when it fires while a vnet is being destroyed
the two wait for each other and jail -r hangs:

  jail:  taskqueue_drain_timeout <- vnet_ipfw_uninit <- vnet_destroy
  swi6:  _sx_xlock <- dyn_tick <- taskqueue_run_locked

Drain the task first.  The pfil hooks and the sockopt handler are
detached by then, and dyn_tick() takes the lock itself.

Reviewed by:            glebius
Fixes:                  331333ba0186 ("ipfw: hold sleepable "upper half...")
Sponsored by:           Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D62245
DeltaFile
+3-2sys/netpfil/ipfw/ip_fw2.c
+3-21 files

FreeBSD/ports 2243c0f — devel/py-ty Makefile distinfo

devel/py-ty: Update to 0.0.115

Changelog: https://github.com/astral-sh/ty/blob/0.0.115/CHANGELOG.md

Reported by:    Repology
DeltaFile
+3-3devel/py-ty/distinfo
+1-1devel/py-ty/Makefile
+4-42 files

LLVM/project ec91206 — clang/lib/Basic/Targets LoongArch.cpp LoongArch.h, clang/test/CodeGen/LoongArch atomic-128.c

[clang][LoongArch] Make 16-byte atomics lock-free with SCQ and LSX

Set MaxAtomicInlineWidth to 128 and define
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 when both SCQ and LSX are available,
matching GCC. __atomic_always_lock_free(16, 0) now returns true for e.g.
-march=la664, and the -Watomic-alignment warning is no longer emitted for
16-byte atomics.
DeltaFile
+34-0clang/test/CodeGen/LoongArch/atomic-128.c
+14-0clang/test/Preprocessor/init-loongarch.c
+4-0clang/lib/Basic/Targets/LoongArch.h
+2-0clang/lib/Basic/Targets/LoongArch.cpp
+54-04 files

LLVM/project ac4a6d4 — llvm/lib/Target/LoongArch LoongArchInstrInfo.td LoongArchISelLowering.cpp, llvm/test/CodeGen/LoongArch/ir-instruction load-store-atomic-128.ll atomicrmw-128.ll

[LoongArch] Lower i128 atomicrmw to a single LL.D/SC.Q loop

i128 xchg/add/sub/and/or/xor/nand were expanded by AtomicExpand to an
atomic load plus a cmpxchg loop nested in an outer retry loop. Lower them
instead to pseudo instructions that are expanded after register allocation
into one loop computing the new value between LL.D/LD.D and SC.Q, like
GCC:

  .loop:
    ll.d   lo, addr, 0
    dbar   20
    ld.d   hi, addr, 8
    <op>   new_lo, new_hi, lo, hi, val_lo, val_hi
    sc.q   new_lo, new_hi, addr
    beqz   new_lo, .loop

For nand the operand is inverted outside the loop and the loop uses ORN.
Other operations (min/max, uinc_wrap, ...) still use the cmpxchg loop.
DeltaFile
+204-1,329llvm/test/CodeGen/LoongArch/ir-instruction/atomicrmw-128.ll
+28-296llvm/test/CodeGen/LoongArch/ir-instruction/load-store-atomic-128.ll
+121-0llvm/lib/Target/LoongArch/LoongArchExpandAtomicPseudoInsts.cpp
+79-4llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+21-0llvm/lib/Target/LoongArch/LoongArchInstrInfo.td
+453-1,6295 files

LLVM/project 6b9c925 — llvm/lib/Target/LoongArch LoongArchISelLowering.h LoongArchISelLowering.cpp, llvm/test/CodeGen/LoongArch/ir-instruction load-store-atomic-128.ll atomicrmw-128.ll

[LoongArch] Support i128 atomic load, store and atomicrmw with SCQ

With +scq the maximum supported atomic size is 128 bits, but only i128
cmpxchg was lowered. i128 atomic store and atomicrmw (xchg, add, sub, and,
or, xor, ...) hit an assertion in DAGTypeLegalizer::ExpandAtomic, and i128
atomic loads were expanded to a cmpxchg loop, which writes memory.

- With LSX, lower i128 atomic load/store to a single VLD/VST, which is
  single-copy atomic for aligned 128-bit accesses (as GCC does). Fences
  are inserted for the stores as for i8/i16.
- Without LSX, expand i128 atomic store to atomicrmw xchg.
- Expand all i128 atomicrmw to a cmpxchg loop.
- Handle unordered ordering when an i128 atomic load is expanded to
  cmpxchg.
DeltaFile
+2,188-0llvm/test/CodeGen/LoongArch/ir-instruction/atomicrmw-128.ll
+673-0llvm/test/CodeGen/LoongArch/ir-instruction/load-store-atomic-128.ll
+64-1llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+3-0llvm/lib/Target/LoongArch/LoongArchISelLowering.h
+2,928-14 files

LLVM/project e7d9bdb — llvm/lib/Target/LoongArch LoongArchInstrInfo.td LoongArchExpandAtomicPseudoInsts.cpp, llvm/test/CodeGen/LoongArch/ir-instruction atomic-cmpxchg-128.ll

[LoongArch] Return an atomic snapshot from failing i128 cmpxchg

The i128 cmpxchg loop reads the low half with LL.D and the high half with
a separate LD.D. When the comparison fails, the loop exits without
executing SC.Q, so nothing guarantees that the two halves were read from
the same store, and the returned "current value" can be torn.

On comparison failure, write the loaded value back with SC.Q and retry if
the SC.Q fails, so the returned value is always a single-copy atomic
snapshot.
DeltaFile
+70-34llvm/test/CodeGen/LoongArch/ir-instruction/atomic-cmpxchg-128.ll
+29-6llvm/lib/Target/LoongArch/LoongArchExpandAtomicPseudoInsts.cpp
+1-1llvm/lib/Target/LoongArch/LoongArchInstrInfo.td
+100-413 files

LLVM/project b0ef7b8 — mlir/include/mlir/Dialect/LLVMIR LLVMIntrinsicOps.td, mlir/test/Dialect/LLVMIR cse-matrix-intrinsics.mlir

[mlir][LLVM] Mark matrix.multiply and matrix.transpose as Pure (#247388)

The LLVM intrinsics llvm.matrix.multiply and llvm.matrix.transpose are
declared with IntrNoMem and IntrSpeculatable in Intrinsics.td, but the
corresponding LLVM dialect ops were defined without any side-effect
traits. As a result, MLIR treated them as having unknown memory effects,
and passes like CSE could not eliminate duplicate instances.

Add the Pure trait to LLVM_MatrixMultiplyOp and LLVM_MatrixTransposeOp
to match the LLVM intrinsic properties, consistent with other
side-effect-free intrinsics in LLVMIntrinsicOps.td.

Fixes #247055
DeltaFile
+28-0mlir/test/Dialect/LLVMIR/cse-matrix-intrinsics.mlir
+4-2mlir/include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td
+32-22 files

FreeBSD/ports 1153280 — www/paseo-web distinfo

www/paseo-web: Update to 0.18.2

Assisted-by:    Claude Code (Opus 5.5)
DeltaFile
+3-3www/paseo-web/distinfo
+3-31 files

FreeBSD/ports de37266 — misc/paseo-desktop/files patch-packages_desktop_src_main.ts, misc/paseo-desktop/files/packagejsons package-lock.json

misc/paseo-desktop: Update to 0.18.2

Assisted-by:    Claude Code (Opus 5.5)
DeltaFile
+49-32misc/paseo-desktop/files/packagejsons/package-lock.json
+60-0misc/paseo-desktop/files/packagejsons/packages/workflows/package.json
+12-7misc/paseo-desktop/files/packagejsons/packages/server/package.json
+11-3misc/paseo-desktop/files/packagejsons/packages/client/package.json
+6-6misc/paseo-desktop/files/patch-packages_desktop_src_main.ts
+5-5misc/paseo-desktop/files/packagejsons/packages/plugin/package.json
+143-5315 files not shown
+172-7921 files

FreeBSD/ports 53d986b — misc/paseo Makefile.common distinfo, misc/paseo/files gen-zsh-completion.mjs

misc/paseo: Update to 0.18.2

Assisted-by:    Claude Code (Opus 5.5, Fable 5.2)
DeltaFile
+81-46misc/paseo/files/packagejsons/package-lock.json
+34-6misc/paseo/files/gen-zsh-completion.mjs
+5-5misc/paseo/distinfo
+1-1misc/paseo/files/packagejsons/package.json
+1-1misc/paseo/Makefile.common
+122-595 files

LLVM/project 1f5ceba — mlir/lib/Dialect/Tensor/IR TensorOps.cpp, mlir/test/Dialect/Tensor canonicalize.mlir

[mlir][tensor] Avoid repeating memory reads when folding extract from generate (#246276)

`ExtractFromTensorGenerate` replaces an extract by recomputing the
requested element at the extract’s location. The old
`wouldOpBeTriviallyDead` check allowed reads because unused reads can be
erased.

**Original IR**

```mlir
func.func @snapshot(%buf: memref<i32>, %new: i32) -> i32 {
  %old = tensor.generate {
    %v = memref.load %buf[] : memref<i32>
    tensor.yield %v : i32
  } : tensor<i32>
  memref.store %new, %buf[] : memref<i32>
  %v = tensor.extract %old[] : tensor<i32>
  return %v : i32
}

    [28 lines not shown]
DeltaFile
+23-0mlir/test/Dialect/Tensor/canonicalize.mlir
+3-2mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
+26-22 files

LLVM/project 9cc4720 — llvm/lib/Target/Hexagon HexagonDepIICHVX.td HexagonDepIICScalar.td, llvm/test/CodeGen/AArch64/Atomics aarch64-atomicrmw-lscp.ll

Merge branch 'main' into users/chinmaydd/builtin-convert-from-arbitrary-fp
DeltaFile
+19,205-18,966llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+15,666-15,524llvm/lib/Target/Hexagon/HexagonDepIICScalar.td
+7,746-8,018llvm/lib/Target/Hexagon/HexagonDepIICHVX.td
+4,870-4,906llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+9,174-0llvm/test/CodeGen/AArch64/Atomics/aarch64-atomicrmw-lscp.ll
+4,456-4,506llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+61,117-51,92013,882 files not shown
+787,949-513,40113,888 files

LLVM/project c94d16c — compiler-rt/lib/scudo/standalone mem_map_linux.cpp report_linux.h, compiler-rt/lib/scudo/standalone/tests wrappers_c_test.cpp

[scudo] Avoid deadlock when reporting map errors on glibc (#246746)

The map, unmap and protect error reports call strerror(). On glibc,
strerror() translates the message through gettext, which calls malloc().
If the error is reported while scudo holds its own locks, that malloc()
re-enters the allocator and deadlocks.

This happens when the initial reservation of the primary fails, e.g.
under a low RLIMIT_AS: the thread already holds the TSD registry mutex,
so the process hangs instead of printing the error and aborting.

On glibc >= 2.32, use strerrordesc_np() instead. It is documented as
async-signal-safe and returns the untranslated message. Other C
libraries keep using strerror(); musl and bionic don't allocate in it.
The mincore() failure message gets the same treatment.

Add a regression test that reports a map error while the allocator is
disabled with malloc_disable().
DeltaFile
+30-3compiler-rt/lib/scudo/standalone/report_linux.cpp
+18-0compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp
+5-0compiler-rt/lib/scudo/standalone/report_linux.h
+1-1compiler-rt/lib/scudo/standalone/mem_map_linux.cpp
+54-44 files

LLVM/project 083db35 — libc/test/UnitTest GTest.h

[libc][test] Add stream printers, Types, and file paths to GTest.h (#247346)

Bring libc/test/UnitTest/GTest.h up to parity with LibcTest.h for
building llvm-libc unit tests against GoogleTest:

- Include TestFilePath.h so libc_make_test_file_path dispatches to
  libc_make_test_file_path_func (matching LibcTest.h, where tests using
  it link CmakeFilePath.cpp or BazelFilePath.cpp rather than falling
  back to Test.h's bare-filename macro), and include TestLogger.h for
  LIBC_NAMESPACE::testing::tlog.
- Re-export ::testing::Types into LIBC_NAMESPACE::testing for typed
  test suites.
- Provide ::std::ostream operator<< overloads for cpp::string_view,
  cpp::string, and BigInt, plus ADL PrintTo overloads for
  cpp::string_view and cpp::string so GoogleTest prints them as strings
  rather than character containers.
- Undefine the XSI isascii and toascii macros that system <ctype.h> may
  leak transitively through <gtest/gtest.h> and <ostream> and collide
  with qualified LIBC_NAMESPACE::isascii and LIBC_NAMESPACE::toascii

    [6 lines not shown]
DeltaFile
+52-5libc/test/UnitTest/GTest.h
+52-51 files