[lldb][NativePDB] Check record types before deserializing (#215847)
When running the `lldb/test/Shell/Expr/TestIRMemoryMapWindows.test` on
my machine, I saw an assertion failure when walking an `LF_FIELDLIST`.
Specifically this assertion:
https://github.com/llvm/llvm-project/blob/8fda9eee8956d4ac5a393689ccbde16a0d3a72b3/llvm/lib/DebugInfo/CodeView/TypeRecordMapping.cpp#L243
The exact assertion isn't that important, although I think `MemberKind`
isn't reset correctly in `TypeRecordMapping::visitMemberEnd`.
The point is that we were visiting data that didn't belong to an
`LF_FIELDLIST` when building the parent map, because we didn't check the
record type before deserializing with
`TypeDeserializer::deserializeAs<FieldListRecord>`. I added a check for
this.
There are more cases where we call `deserializeAs` but didn't check the
symbol type in the function. However, in these cases, the callers
already check the type. I still added safety checks for them.
Furthermore, we still have some `lldbassert`s in the file. I'll remove
them in a followup PR.
[libc] Add `NEED_MPFR_F128` argument to add_fp_unittest. (#215657)
Currently, the MPFR would link unconditionally when we remove the
function from the guards to make it available everywhere. This
introduces another problem with the function's test, in which MPFR is
used, which would also get tested unconditionally now .
The MPFR would use native float128 types internally when built on a
compiler with float128 support. But where it doesn't have native
support, it would fail .
Thus, to prevent this failure, we only run the MPFR tests for targets
with native float128 by adding `NEED_MPFR128`
[lld][WebAssembly] Update incorrect assertion in global relocation code (#215929)
When extended-const is enabled, non-TLS global relocations are handled
via extended constant expressions. However, TLS GOT entries still
require runtime relocation code in `__wasm_apply_global_tls_relocs`
because TLS global addresses depend on `__tls_base`.
Allow `GlobalSection::generateRelocationCode` to be called when `TLS` is
true even if `ctx.arg.extendedConst` is set.
CodeGen: Pass the exception model to the EH register hooks
Currently this is sourced from TargetOptions. In the future
this should come from program state, so needs to be passed in
from a value derived from the module flag. Thread through the
argument for future use. For now it's still sourced directly
from the TargetOptions.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[clangd] Fix hang in include-cleaner (#215980)
Address FIXME in computeIncludeCleanerFindings: locations inside the
preamble patch are mapped back into the main file via their presumed
locations.
This fixes hang in include-cleaner when mapping refs through a stale
preamble.
Test plan: ninja check-all
security/openssh-portable: Use blocklist
Starting from FreeBSD version 1500000, prefer the new blocklist
nomenclature.
Once older versions are no longer supported, we should use blocklist
exclusively.
This also fixes a regression with UseBlacklist not being properly
read from the config in commit 516c0db3f73b for the 10.4 update.
PR: 294082
[UniformityAnalysis] Add test for missed cycle exit PHI divergence
Add a test exposing a bug where the uniformity analysis fails to mark
a cycle exit PHI as divergent. The PHI has constant operands from
multiple cycle predecessors -- one via a divergent exit and one via a
uniform exit. The analysis misses this because usesValueFromCycle()
only checks for instruction operands defined inside the cycle, not
for constant values arriving from different cycle predecessors.
Co-Authored-By: Claude Opus 4.6 <noreply at anthropic.com>
[BPF] Visit base access-index calls in insertion order (#215948)
BaseAICalls is keyed on CallInst *, so transformGEPChain visits the base
calls in heap address order rather than the order collectAICallChains
walked them. The relocation globals come out in that order and the
passthrough calls are numbered in it, so the IR a build emits depends on
where the calls landed in memory.
No regressions on check-llvm-codegen-bpf.
[Flang][OpenMP] PoC module support for allocate directives
This patch implements partial support for `allocate` on Fortran
module variables, based on adding global constructor functions for each
impacted variable.
Shared as a proof of concept, because I have a few concerns about it:
1. It appears that Clang ignores `allocate` directives on global
variables instead. Is that the expected behavior?
2. The existing implementation for `allocate` in Flang doesn't
actually impact where the memory used for a variable resides. It
allocates/deallocates extra memory for it using OpenMP internal
compiler calls but then that storage is never used. The original
alloca is still used. This addition suffers from the same issue:
global constructors allocate extra memory that is never used to
update in any way the associated global variable or its users.
3. No `omp.allocate_free` (should be `omp.allocate.free`) can be added
by this approach.
4. The representation of `omp.allocate_dir` (should be `omp.allocate`)
[10 lines not shown]
[lldb-dap] Migrate memory and disconnect tests (#215821)
In Disconnect `test_attach` test, use a breakpoint to stop the process
to ensure we are in the `handle_attach` frame to change the
`wait_for_attach` variable.
[Flang][OpenMP] Prevent allocate directive ICE on module variables
The current lowering implementation for `allocate` directives assumes
the MLIR function in which it is creating operations will still be there
by finalization time, so that it can add a deallocation call.
When lowering Fortran modules, this is not the case (lowering happens
in a temporary dummy function) and it results in a compiler crash
while running cleanup callbacks. This patch adds a TODO for this case.
release/riscv: tweak GENERICSD partition placement
Increase EFI partition size to begin rootfs at 64mb. I believe this was
my original intention. I have a microSD card with 8mb block size which
emits an advisory in verbose dmesg about the misaligned partition.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
libusb: Mark defualt smybol tag as latest stable version
As we might change the libusb ABI in 16, we should mark thje first
version as FBSD_1.8 instead of 1.9. Since versioning patch has not
landed for a long time, it makes sense to change it directly.
Discussed with: kib
Fixes: 527a82474cb3 ("libusb: versioning symbols")
Sponsored by: The FreeBSD Foundation