Revert "[Clang] Refactor instantiation of declarations within concepts" (#223235)
This reverts llvm/llvm-project#221707
This broke std::map as reported in
https://github.com/llvm/llvm-project/issues/223220
[DAGCombiner] Only fold shift+mask compare to rotate if the shift amount divides the bit width (#220743)
DAGCombiner::visitSETCC can turn `(X << S) == (X & -(1 << S))` (or the
srl variant) into `rotl(X, S) == X`, and the other way around, when the
target prefers one form over the other. The two forms are only equivalent when
S divides the bit width. The check used `isPowerOf2(S)`, which is the same
thing for i8/i16/i32/i64 but not for odd widths like i3, where S = 2 is a
power of two that does not divide 3. On x86, which prefers the rotate,
the reporter's i3 function returned the wrong value for two of its eight
inputs.
This changes the `MayTransformRotate` flag passed to
`preferedOpcodeForCmpEqPiecesOfOperand` to check `NumBits % S == 0`
(with S != 0) and fixes the two comments that described the old rule. For legal
scalar types nothing changes. On illegal non power of two widths this
also lets a non power of two amount that divides the width use the rotate
(like i6 with S = 3); that is correct for the same reason and legalizes
through the usual rotate promotion, same as i6 with S = 2 did before. The x86
hook already honors the flag in both directions, so the fix lives in the
[6 lines not shown]
[lldb] Bound Mach-O symtab allocation to the file size (#222955)
Opening a Mach-O file whose LC_SYMTAB claims far more symbols than the
file could possibly hold makes lldb ask for hundreds of gigabytes. A
128-byte file with LC_SYMTAB.nsyms = 0x80000000 (the new unit test's
input, built with yaml2obj) reproduces it through `lldb-target-fuzzer`,
the harness that found this bug:
```
==45515== ERROR: libFuzzer: out-of-memory (malloc(171798691840))
#8 std::__1::__split_buffer<lldb_private::Symbol,...>::__split_buffer(...)
#9 std::__1::vector<lldb_private::Symbol,...>::resize(unsigned long)
#10 lldb_private::Symtab::Resize(unsigned long)
#11 ObjectFileMachO::ParseSymtab(lldb_private::Symtab&)
```
`ParseSymtab()` sizes the destination `Symtab`'s `vector<Symbol>`
directly
from `nsyms` and `nindirectsyms`, two counts read from the file's
[14 lines not shown]
[SLP]Fix dep accounting when cancelling a bundle with repeated copyable users
Skip duplicate users instead of stopping at the first one when walking
the operand lanes; an early stop misses a trailing self-use lane, the
displaced parent-edge copyable data is never restored, and scheduling
asserts.
Fixes #223225
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/223236
multimedia/libbluray: update to version 1.5.1
This is an important bug-fix release:
- Fix out-of-bounds write in graphics processor on invalid input
- Fix possible buffer overread when parsing PTS/DTS in m2ts demuxer
- Fix NULL dereference in playlist subpath cleanup
- Fix chapter and playmark search range checks
- Fix invalid memory access with out-of-range angles on multi-angle discs
- Harden clip info (CLPI) parsing against out-of-range indexes and empty tables
- Harden RLE decoding against integer overflow and oversized allocations
- Detect seek/read failures in the bitstream reader
- Fix branch condition (BC) instruction in HDMV VM
- Avoid undefined behaviour in HDMV VM shifts and sound data parsing
- BD-J: Fix DSMCCObject unload condition
- BD-J: Restrict visibility of EventManager and NPTRate constructors
multimedia/libbluray: update to version 1.5.1
This is an important bug-fix release:
- Fix out-of-bounds write in graphics processor on invalid input
- Fix possible buffer overread when parsing PTS/DTS in m2ts demuxer
- Fix NULL dereference in playlist subpath cleanup
- Fix chapter and playmark search range checks
- Fix invalid memory access with out-of-range angles on multi-angle discs
- Harden clip info (CLPI) parsing against out-of-range indexes and empty tables
- Harden RLE decoding against integer overflow and oversized allocations
- Detect seek/read failures in the bitstream reader
- Fix branch condition (BC) instruction in HDMV VM
- Avoid undefined behaviour in HDMV VM shifts and sound data parsing
- BD-J: Fix DSMCCObject unload condition
- BD-J: Restrict visibility of EventManager and NPTRate constructors
[SelectionDAG] Handle scalable INSERT_SUBVECTOR in ComputeNumSignBits (#221631)
Handle scalable INSERT_SUBVECTOR in SelectionDAG as a pre-fix for
#220976.
Add coverage for scalable subvectors and fixed subvectors inserted into
scalable vectors.