LLVM/project c5eafbcclang/lib/StaticAnalyzer/Core RegionStore.cpp, clang/test/Analysis initialization.cpp bstring_UninitRead.c

[analyzer] Normalize sub-array indices in RegionStore initializer res… (#200044)

…olution

After #198346, alpha.unix.cstring.UninitializedRead reports a false
positive when a pointer into a fully-initialized const multidimensional
array is advanced past an inner dimension boundary and used as a source
argument to memcpy. The root cause is in
`convertOffsetsFromSvalToUnsigneds` in RegionStore, which returned
UndefinedVal for any element index exceeding its sub-array extent,
conflating pointer arithmetic legality with memory initializedness.

This patch separates the two concerns. The RegionStore now normalizes
indices that overflow an inner dimension by carrying into the outer
dimension via divmod, the same way `arr[0][5]` in `int arr[4][3]`
denotes the same memory as `arr[1][2]`. UndefinedVal is returned only
when the computed flat offset exceeds the total array allocation.
Whether cross-subobject pointer arithmetic constitutes undefined
behavior per C/C++ standards is a separate concern for individual

    [3 lines not shown]
DeltaFile
+86-3clang/test/Analysis/initialization.cpp
+39-47clang/lib/StaticAnalyzer/Core/RegionStore.cpp
+17-0clang/test/Analysis/bstring_UninitRead.c
+2-2clang/test/Analysis/initialization.c
+144-524 files

LLVM/project ae464f6clang-tools-extra/clang-tidy/cert CERTTidyModule.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Fix cert-err33-c inheriting CheckedReturnTypes from bugp… (#200169)

…rone-unused-return-value

The cert-err33-c alias did not override CheckedReturnTypes, causing it
to inherit the default from bugprone-unused-return-value. This made it
flag any function returning std::error_code, std::expected, etc. That is
outside the scope of CERT ERR33-C (a fixed list of C standard library
functions).
Set CheckedReturnTypes to empty so the alias only checks its intended
function list.

---------

Co-authored-by: EugeneZelenko <eugene.zelenko at gmail.com>
DeltaFile
+26-0clang-tools-extra/test/clang-tidy/checkers/cert/err33-c.cpp
+6-0clang-tools-extra/docs/ReleaseNotes.rst
+1-0clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
+33-03 files

LLVM/project 4a00d00.github/workflows libc-overlay-tests.yml libc-fullbuild-tests.yml

[libc][ci] Use lld for linking in precommit CIs. (#200897)
DeltaFile
+3-0.github/workflows/libc-overlay-tests.yml
+1-0.github/workflows/libc-fullbuild-tests.yml
+1-0.github/workflows/libc-shared-tests.yml
+5-03 files

LLVM/project 948b2b5mlir/lib/Dialect/Linalg/Transforms Transforms.cpp, mlir/test/Dialect/Linalg transform-lower-pack.mlir

[mlir][Linalg] Enable lowering/decomposing scalable pack ops (#200216)

Enables lowering/decomposing `linalg.pack` ops with dynamic inner tiles
to a sequence of `tensor.pad` -> `tensor.expand_shape` ->
`linalg.transpose` ops.

---------

Signed-off-by: Ege Beysel <beyselege at gmail.com>
DeltaFile
+80-0mlir/test/Dialect/Linalg/transform-lower-pack.mlir
+10-7mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
+90-72 files

FreeBSD/ports 637e02c. UIDs GIDs

UIDs/GIDs: remove duplicated entries

Fix duplicated autopulse and ldap entries introduced while
adding the bunkerweb user and group.

Reported by:    osa
Sponsored by:   Netzkommune GmbH
DeltaFile
+0-3UIDs
+0-3GIDs
+0-62 files

LLVM/project 4ae3323offload/plugins-nextgen/level_zero/include AsyncQueue.h L0CmdListManager.h, offload/plugins-nextgen/level_zero/src L0Device.cpp L0Queue.cpp

[OFFLOAD][L0] Refactor AsyncQueues (#200650)

This PR introduces a major refactor on how L0 queues are used in the
plugin as the current design is too tied to OpenMP behavior. There are
two major changes:

* We no longer have a per-thread queue cache as this resulted in a
single logical queue backed up by multiple L0 queues. We now have a per
device cache which should have a similar level of reuse performance.
* The AsyncQueueTy type has been largely extended to hide the logic of
the different queues types (which are now subclasses of AsyncQueueTy).
This has greatly simplified the L0Device implementation.

As part of this refactor a number of other changes happened:

* Copy command lists were removed in favor of the
ZE_COMMAND_QUEUE_FLAG_COPY_OFFLOAD_HINT driver hint.
* Support for inorder queues was added (can be selected using
LIBOMPTARGET_LEVEL_ZERO_COMMAND_MODE=inorder).

    [7 lines not shown]
DeltaFile
+82-372offload/plugins-nextgen/level_zero/src/L0Device.cpp
+387-0offload/plugins-nextgen/level_zero/src/L0Queue.cpp
+178-11offload/plugins-nextgen/level_zero/include/AsyncQueue.h
+132-0offload/plugins-nextgen/level_zero/include/L0CmdListManager.h
+18-112offload/plugins-nextgen/level_zero/src/L0Kernel.cpp
+61-62offload/plugins-nextgen/level_zero/include/L0Device.h
+858-55710 files not shown
+877-70616 files

LLVM/project 910b4afllvm/lib/ObjCopy/DXContainer DXContainerObjcopy.cpp, llvm/test/tools/llvm-objcopy/DXContainer dump-section.yaml copy-headers.yaml

Revert "[llvm-objcopy] Strip header from DXContainer's ILDB part during `--dump-section`" (#200867)

Reverts llvm/llvm-project#198578
Failed build: https://lab.llvm.org/buildbot/#/builders/190/builds/43332
DeltaFile
+219-19llvm/test/tools/llvm-objcopy/DXContainer/dump-section.yaml
+3-12llvm/test/tools/llvm-objcopy/DXContainer/copy-headers.yaml
+1-1llvm/lib/ObjCopy/DXContainer/DXContainerObjcopy.cpp
+223-323 files

LLVM/project 0b411ballvm/lib/Target/X86 X86ISelLowering.cpp

[X86] lowerShuffleAsBitBlend - use getConstVector to create selection mask (#200877)

Avoids wasteful SDValue creation if the shuffle matching fails, handles
any i64 legalisation and makes it easier to add UNDEF element handling
in the future.
DeltaFile
+5-6llvm/lib/Target/X86/X86ISelLowering.cpp
+5-61 files

LLVM/project e814c5aflang/lib/Lower/OpenMP OpenMP.cpp Utils.h, flang/test/Lower/OpenMP metadirective-construct.f90

Refine metadirective construct context handling and improve comments

Drop construct={simd} context matching because metadirectives
encountered in SIMD regions are rejected by semantics today:

```
subroutine test_construct_simd(n)
  integer :: i, n
  !$omp simd
  do i = 1, n
    !$omp metadirective &
    !$omp & when(construct={simd}: nothing) &
    !$omp & default(taskyield)
  end do
  !$omp end simd
end subroutine
```

Keep construct={for} matching because it only observes an already-lowered

    [6 lines not shown]
DeltaFile
+15-0flang/test/Lower/OpenMP/metadirective-construct.f90
+4-7flang/lib/Lower/OpenMP/OpenMP.cpp
+7-0flang/lib/Lower/OpenMP/Utils.h
+26-73 files

LLVM/project 9433fd7compiler-rt/lib/builtins/ppc init_ifuncs.c

[AIX] Set the ifunc constructor's priority to 100, to run before any user code (#200893)

Co-authored-by: Wael Yehia <wyehia at ca.ibm.com>
DeltaFile
+1-1compiler-rt/lib/builtins/ppc/init_ifuncs.c
+1-11 files

FreeBSD/ports 6816c9asysutils Makefile, sysutils/bttf distinfo Makefile

sysutils/bttf: New port: Command-line utility for datetime processing

bttf is a command-line utility for working with dates and times. It
exposes much of the functionality of the Jiff datetime library on the
command line, providing a more intuitive way to format datetimes or do
arithmetic than traditional tools like date(1).
DeltaFile
+225-0sysutils/bttf/distinfo
+132-0sysutils/bttf/Makefile
+12-0sysutils/bttf/pkg-descr
+1-0sysutils/Makefile
+370-04 files

FreeBSD/src f77d37csys/compat/linux linux_file.c

linuxulator: Return EINVAL for invalid inotify flags

We implement all of the currently-defined Linux inotify mask bits and
flags, with the same values as Linux.  Return EINVAL for unknown bits,
as Linux does.

This also moves the translation inline into linux_inotify_add_watch.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57387
DeltaFile
+6-12sys/compat/linux/linux_file.c
+6-121 files

LLVM/project 0d98eb6clang/lib/CIR/CodeGen CIRGenFunction.h CIRGenCleanup.cpp, clang/test/CIR/CodeGen cleanup-conditional.cpp loop-cond-cleanup.cpp

[CIR] Fix ordering of lifetime-extended cleanups (#200874)

We had a bug that was causing any lifetime-extended cleanups that
occurred within a full-expression cleanup scope to be emitted
prematurely when the expression also required deferred conditional
cleanups. This was, in some cases, causing a dangling reference to
temporaries that had already been destructed. Luckily, it was also
causing us to not emit a return at the end of the function in one case,
leading the verifier to draw attention to this problem.

This change introduces new functions in RunCleanupsScope to allow
"ordinary" EH stack cleanups to be force-emitted separately from
lifetime-extended cleanups. Classic codegen doesn't need this capability
because it handles deferred conditional cleanups very differently than
CIR due to its flat/branching approach.

The testing for this fix did uncover a significant issue wherein CIR is
calling destructors in the wrong order even after the fix in this PR.
However, that's a pre-existing issue that will require changes beyond

    [2 lines not shown]
DeltaFile
+158-0clang/test/CIR/CodeGen/cleanup-conditional.cpp
+23-0clang/lib/CIR/CodeGen/CIRGenFunction.h
+10-3clang/lib/CIR/CodeGen/CIRGenCleanup.cpp
+3-3clang/test/CIR/CodeGen/loop-cond-cleanup.cpp
+194-64 files

LLVM/project dc448dallvm/lib/Transforms/Vectorize VectorCombine.cpp, llvm/test/Transforms/VectorCombine fold-shuffle-chains-to-reduce.ll

[VectorCombine] Don't fold non-idempotent shuffle reductions when shuffle duplicates element (#200778)

This is a small correctness fix for foldShuffleChainsToReduce. For odd /
non-power-of-2 vector sizes the parity-mask scheme duplicates a lane,
which is only sound when the reduction op is idempotent. For
non-idempotent ops (e.g. add, xor) the duplicated lane changes the
result, so I track a HasLaneDuplication flag and bail out of the fold in
that case. Tests cover non-foldable add/xor and a still-foldable
idempotent smax.
DeltaFile
+44-4llvm/test/Transforms/VectorCombine/fold-shuffle-chains-to-reduce.ll
+8-0llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+52-42 files

FreeNAS/freenas 2db7f66src/middlewared/middlewared/plugins/system product.py

NAS-141191 / 26.0.0-RC.1 / fix release_notes_url (by yocalebo) (#19048)

This was broken silently outside our control. Return the new style URL
so release note hyperlinks in the TrueNAS UI actually resolve instead of
returning a 404 like they do currently.

Original PR: https://github.com/truenas/middleware/pull/19047

Co-authored-by: caleb <yocalebo at gmail.com>
DeltaFile
+2-7src/middlewared/middlewared/plugins/system/product.py
+2-71 files

LLVM/project 80875b8llvm/test/Transforms/LoopVectorize replace-first-order-recurrence-by-versioned-iv.ll iv_outside_user.ll, llvm/test/Transforms/LoopVectorize/VPlan vplan-printing-reductions.ll

[LV] Add users to header phis in tests (NFC). (#200890)

Make sure the header phis in various tests are actually used, to make
them more robust w.r.t. to future simplification changes. Those dead
phis would be cleaned up before LV in the regular pipeline.
DeltaFile
+6-4llvm/test/Transforms/LoopVectorize/replace-first-order-recurrence-by-versioned-iv.ll
+5-1llvm/test/Transforms/LoopVectorize/VPlan/vplan-printing-reductions.ll
+6-0llvm/test/Transforms/LoopVectorize/iv_outside_user.ll
+17-53 files

LLVM/project 209d77cllvm/lib/IR Globals.cpp

[IR] Reorder checks in isInterposable() (NFC) (#200862)

The isDSOLocal() check is a lot cheaper than getSemanticInterposition(),
so perform it first.
DeltaFile
+2-2llvm/lib/IR/Globals.cpp
+2-21 files

NetBSD/src heqmQG6lib/libutil pidfile.c

   pidfile: set errno when reading a corrupt pidfile

   strtoi doesn't set errno itself but passed it back as an argument
VersionDeltaFile
1.19+5-3lib/libutil/pidfile.c
+5-31 files

FreeNAS/freenas d2c0f28src/middlewared/middlewared/plugins/system product.py

fix release_notes_url

(cherry picked from commit cab9f48f0a3cdfc5f42cd50028f4c18ebdf4641c)
DeltaFile
+2-7src/middlewared/middlewared/plugins/system/product.py
+2-71 files

FreeNAS/freenas 4251827src/middlewared/middlewared/plugins/system product.py

NAS-141191 / 27.0.0-BETA.1 / fix release_notes_url (#19047)

This was broken silently outside our control. Return the new style URL
so release note hyperlinks in the TrueNAS UI actually resolve instead of
returning a 404 like they do currently.
DeltaFile
+2-7src/middlewared/middlewared/plugins/system/product.py
+2-71 files

FreeBSD/ports 7ddb510lang/starlark-rust distinfo Makefile

lang/starlark-rust: update 0.13.0 → 0.14.0
DeltaFile
+459-305lang/starlark-rust/distinfo
+229-153lang/starlark-rust/Makefile
+688-4582 files

FreeBSD/ports 94dcf4atextproc/ytt distinfo Makefile

textproc/ytt: update 0.55.0 → 0.55.1
DeltaFile
+5-5textproc/ytt/distinfo
+2-2textproc/ytt/Makefile
+7-72 files

FreeBSD/ports ea8cbb0shells/meka distinfo Makefile

shells/meka: update 0.27.1 → 0.27.2
DeltaFile
+5-5shells/meka/distinfo
+1-1shells/meka/Makefile
+6-62 files

FreeBSD/ports aa5aeeemisc/lean-ctx distinfo Makefile

misc/lean-ctx: update 3.6.24 → 3.6.26
DeltaFile
+9-3misc/lean-ctx/distinfo
+4-1misc/lean-ctx/Makefile
+13-42 files

FreeBSD/ports 805a9fbnet/frp distinfo Makefile

net/frp: update 0.69.0 → 0.69.1
DeltaFile
+5-5net/frp/distinfo
+1-1net/frp/Makefile
+6-62 files

FreeBSD/ports 746d7a2security/gosec distinfo Makefile

security/gosec: update 2.26.1 → 2.27.0
DeltaFile
+5-5security/gosec/distinfo
+1-2security/gosec/Makefile
+6-72 files

LLVM/project 0f1f234libc/test/src/math exp_test.cpp acos_test.cpp

[libc][math] Adding constexpr to tests for Double-type math functions  (#200681)

Similar to 
```CPP
  constexpr uint64_t X_COUNT = 123;
  constexpr uint64_t X_START = FPBits(0.25).uintval();
  constexpr uint64_t X_STOP = FPBits(4.0).uintval();
  constexpr uint64_t X_STEP = (X_STOP - X_START) / X_COUNT;

  constexpr uint64_t Y_COUNT = 137;
  constexpr uint64_t Y_START = FPBits(0.25).uintval();
  constexpr uint64_t Y_STOP = FPBits(4.0).uintval();
  constexpr uint64_t Y_STEP = (Y_STOP - Y_START) / Y_COUNT;
  ```
  in [atan2_test.cpp](https://github.com/llvm/llvm-project/blob/main/libc/test/src/math/atan2_test.cpp)
  This PR tends to add constexpr to all double function tests-only
  
  Additonally, replacing 
  ``` CPP

    [6 lines not shown]
DeltaFile
+3-3libc/test/src/math/exp_test.cpp
+3-3libc/test/src/math/acos_test.cpp
+3-3libc/test/src/math/asin_test.cpp
+3-3libc/test/src/math/atan_test.cpp
+3-3libc/test/src/math/cbrt_test.cpp
+3-3libc/test/src/math/exp10_test.cpp
+18-184 files not shown
+30-3010 files

LLVM/project e5851a8llvm/lib/Target/NVPTX NVPTXISelLowering.cpp NVPTXInstrInfo.td, llvm/test/CodeGen/NVPTX convert-fp.ll

[NVPTX] Fix fptosi/fptoui to i1. (#200718)

The langref says:

> The 'fptosi' instruction converts its floating-point operand into the
> nearest (rounding towards zero) signed integer value. If the value
> cannot fit in ty2, the result is a poison value.

Previously `fptosi to i1` and `fptoui to i1` were lowered as `x == 0.0`,
which is clearly incorrect.

Because the conversion truncates toward zero, the only results that are
not poison are:

 - 0 and -1 for the signed case, and
 - 0 and 1 for the unsigned case.

So the i1 result is fully determined by a single fp compare:


    [3 lines not shown]
DeltaFile
+35-4llvm/test/CodeGen/NVPTX/convert-fp.ll
+13-0llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
+3-8llvm/lib/Target/NVPTX/NVPTXInstrInfo.td
+51-123 files

LLVM/project 09bf7efllvm/include/llvm/Testing/Annotations Annotations.h, llvm/lib/Testing/Annotations Annotations.cpp

[Testing] Allow custom markers in llvm::Annotations (#195570)

The current annotation markers can conflict with several language
constructs. Notably, `[[ ]]` and `^` collide with C++ attributes (e.g.,
`[[nodiscard]]`), the C++26 reflection operator (`^^int`), and
Objective-C blocks (`void (^foo)(void)`). Similarly, `$` can conflict
with identifiers that also use `$` with `-fdollars-in-identifiers`, as
well as with C++26 code that uses `$` as raw-string delimiters or as a
preprocessing token
([P2558R2](https://www.open-std.org/JTC1/SC22/WG21/docs/papers/2023/p2558r2.html)).

Because the markers are currently hardcoded in `llvm::Annotations`,
existing workarounds have to rely on digraphs or macro substitution via
implicit `#define`s. These approaches reduce readability and make tests
cumbersome to write. This PR alleviates these issues by adding support
for custom markers. It adds an overloaded `Annotations` constructor that
accepts a new `Annotations::Markers` struct. For example, to use `~` for
point, `@` for name, and `{{`/`}}` for range:


    [39 lines not shown]
DeltaFile
+75-1llvm/unittests/Testing/Annotations/AnnotationsTest.cpp
+51-8llvm/include/llvm/Testing/Annotations/Annotations.h
+39-11llvm/lib/Testing/Annotations/Annotations.cpp
+165-203 files

OpenBSD/src ool0fS4sys/kern kern_event.c

   Do KN_DETACHED flag check before kn->kn_ptr.p_process dereference in
   proc_filtops handlers. After filt_proc() sets KN_DETACHED flag, the
   kn->kn_ptr.p_process is not valid anymore.

   ok visa
VersionDeltaFile
1.206+43-25sys/kern/kern_event.c
+43-251 files