[compiler-rt][TySan] Use pointer-width types for shadow memory ops (#191602)
The TySan runtime used uint64_t/int64_t casts for shadow memory pointer
arithmetic and interior-byte marker values. These are incorrect on
32-bit targets where pointers are 4 bytes: the shadow entries are
pointer-sized, so the offsets and marker values must also be
pointer-sized.
Replace uint64_t/int64_t with uptr/sptr (sanitizer_common's
pointer-width typedefs) throughout SetShadowType, GetNotAllBadTD,
GetNotAllUnkTD, and __tysan_instrument_mem_inst. This is a no-op on
64-bit targets (where uptr == uint64_t) and fixes shadow corruption on
32-bit targets.
[Hexagon] Add CFI-ICall sanitizer support (#191754)
Enable -fsanitize=cfi-icall for Hexagon targets:
- Add Hexagon to the CFI-ICall allow-list in the Clang driver.
- Add Hexagon jump table support in LowerTypeTests: 4-byte entries using
the `jump` instruction, and route Hexagon through the native function
bit-set builder.
[AArch64][llvm] Redefine some isns as an alias of `SYS`
Some instructions are not currently defined as an alias of `SYS`
when they should be, so they don't disassemble back into the
native instruction, but instead disassemble into `SYS`.
Fix these cases and add additional testcase.
Note that I've left `GCSPUSHM` due to a `mayStore`, `GCSSS1` and
`GCSSS2` as they're used in AArch64ISelDAGToDAG.cpp, and `GCSPOPM`
has an intrinsic pattern in AArch64InstrInfo.td. They will disassemble
correctly though, as they use `InstAlias`.
[AArch64] Fix strict weak ordering violation in regalloc hints sort. (#192055)
This fixes an error with expensive checks after landing #190139.
The issue was:
Error: comparison doesn't meet irreflexive requirements, assert(!(a <
a)).
because it could have previously returned 'true' in the ordering
function if registers A and B were equal.
Also made NFC change to rename 'HandleMatchCmpPredicateHint' ->
'HandleDestructivePredicateHint' (that was missed in the review).
[lldb] Fix synthetic frame identity loss during incremental fetches (#191903)
When `SyntheticStackFrameList::FetchFramesUpTo` is called incrementally,
PC-less synthetic frames can end up with identical `StackID` values.
This happens because `num_synthetic_frames` is reset to zero on each
call, handing out duplicate call frame addresses. Since PC-less frames
all share `LLDB_INVALID_ADDRESS` as their PC, the `StackID` equality
check cannot distinguish them, and `ExecutionContextRef` resolves the
wrong frame.
The fix counts existing synthetic frames in `m_frames` before starting
the fetch loop so new frames receive unique call frame addresses.