powerpc/booke(pmap): Flash-invalidate TLB on TID rollover
When the TID rolls over on a given CPU, simply flash-invalidate the
TLB instead of walking the TLB to only invalidate the repurposed TID.
Walking 256 entries is expensive, and we'll likely be inserting a bunch
new ones anyway in the new environment, since 256 really only handles
1MB of storage, so the likelihood of other mappings continuing to exist
in the TLB when their thread owner is scheduled again is very very
small.
powerpc/pmap(booke): Fix TLB TID eviction
Fix tid_set_busy() for when `pmap` is NULL. Obviously a NULL pointer
cannot be correctly used, so I'm not sure how it worked in testing on
64-bit.
[llvm][DebugInfo] Add DW_LNAME_ support to DWARFDie::getLanguage (#207151)
Currently `DWARFDie::getLanguage` only looks at `DW_AT_language`.
However, with DWARFv6 we may not have such attribute, and instead have a
`DW_AT_language_name` (and optional `DW_AT_language_version`).
This patch adjusts the implementation to also consider the DWARFv6
language name/version codes. In this patch I just convert it back to
`DW_LANG_` (similar to what we do for the `AsmPrinter`'s
`DwarfUnit::getSourceLanguage`). Added a FIXME to investigate whether we
want to return a variant-like type that can be either an DW_LANG vs.
DW_LNAME code.
The way I initially observed this was looking at a DWARFv6 dwarfdump for
a `const char[]` type. It displayed as follows:
```
DW_AT_type (0x... "const char[[?, ? + 3)]")
```
which is our representation for when we [can't derive the default lower
[12 lines not shown]
CI: move libclang python byindings tests to main CI
This removes the separate python bindings CI, which run on the GitHub free
runners and take more than one hour to build libclang.
The tests are executed instead in the monolithic pipelines,
whenever clang would be tested.
This is fine in terms of resources because all the dependencies are
built anyway, and the tests themselves take less than one second to
run on the free runners.
[Support] Fix undefined shift in decodeULEB128/decodeSLEB128 for overlong encodings (#205907)
When a (signed or unsigned) LEB128 value is encoded with extra trailing
bytes that only carry zero- or sign-extension, the decode loop could
keep
running with the shift amount at 64 or beyond and then evaluate
`Slice << Shift`, which is undefined behavior for a 64-bit type.
The DWARF expression parser feeds attacker-controlled LEB128 operands
(such as `DW_OP_bregN` / `DW_OP_constu`) through
`DataExtractor::getULEB128` / `getSLEB128`, so the
`lldb-dwarf-expression-fuzzer` reaches this under UBSan. The unsigned
case:
```
LEB128.h:152:20: runtime error: shift exponent 70 is too large for
64-bit type 'uint64_t' (aka 'unsigned long long')
#0 llvm::decodeULEB128(...) LEB128.h:152
#1 getLEB128<unsigned long long>(...) DataExtractor.cpp:227
[27 lines not shown]
[flang] keep runtime allocator for pinned allocations (#207822)
If an allocatable is pinned, use the flang runtime instead of lowering
to normal memcpy/free.
---------
Co-authored-by: Yebin Chon <ychon at nvidia.com>
[Clang][counted_by] Use the expr's RecordDecl that transitively contains the counter field (#205903)
The counted field could be in nested structs. This can happen when the
Expr is pointing to a field that has a struct type. The original code
didn't do a good job at finding the best RecordDecl to build the GEP off
of. It made too many assumptions about how structs' layouts.
This rewrite finds the RecordDecl that transitively contains the
__counted_by__'s counter field.
Fixes: #205652
[AArch64] Support 4-byte stack protector with large code model. (#205956)
This is a simple extension to existing code. We might need this in the
future.
CI: move libclang python byindings tests to main CI
This removes the separate python bindings CI, which run on the GitHub free
runners and take more than one hour to build libclang.
The tests are executed instead in the monolithic pipelines,
whenever clang would be tested.
This is fine in terms of resources because all the dependencies are
built anyway, and the tests themselves take less than one second to
run on the free runners.