[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.
Require DNS updates for the IPA directory service
Creating the SMB and NFS Kerberos service principals during an IPA
join uses FreeIPA's service-add, which refuses to add a service to a
host that has no DNS A/AAAA record. register_dns() creates that
record, so it is a prerequisite for service-principal setup rather
than an optional step.
With DNS updates disabled the join aborted at register_dns() before
the service principals were created, leaving smbd unable to start:
krb5_kt_start_seq_get on FILE:/etc/ipa/smb.keytab failed
(No such file or directory)
Reject enable_dns_updates=False for IPA at validation time with a
clear message, since DNS updates are currently required to properly
support kerberized services.
Also roll back the local configuration written during a failed join
[9 lines not shown]
NAS-138474 / 27.0.0-BETA.1 / Require DNS updates for the IPA directory service (#19263)
Creating the SMB and NFS Kerberos service principals during an IPA
join uses FreeIPA's service-add, which refuses to add a service to a
host that has no DNS A/AAAA record. register_dns() creates that
record, so it is a prerequisite for service-principal setup rather
than an optional step.
With DNS updates disabled the join aborted at register_dns() before
the service principals were created, leaving smbd unable to start:
```
krb5_kt_start_seq_get on FILE:/etc/ipa/smb.keytab failed
(No such file or directory)
```
Reject enable_dns_updates=False for IPA at validation time with a
clear message, since DNS updates are currently required to properly
support kerberized services.
[VPlan] Refine hasEarlyExit check. (#207791)
Currently hasEarlyExit misses cases where we have things like dead exit
blocks or simplified the middle block.
Update to check by counting the predecessors.
This fixes a case where we missed properly updating LoopInfo due to
incorrect results.
Fixes https://github.com/llvm/llvm-project/issues/206007.
Update clang/include/clang/ScalableStaticAnalysis/Analyses/OperatorNewDelete/OperatorNewDeletePointers.h
Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>