1. Mar 15, 2024
  2. Mar 14, 2024
    • Jason Molenda's avatar
      [lldb] [Mach-O] ProcessMachCore needs to strip TBI data from addrs (#84998) · 52557bce
      Jason Molenda authored
      Darwin AArch64 application processors are run with Top Byte Ignore mode
      enabled so metadata may be stored in the top byte, it needs to be
      ignored when reading/writing memory. David Spickett handled this already
      in the base class Process::ReadMemory but ProcessMachCore overrides that
      method (to avoid the memory cache) and did not pick up the same change.
      I add a test case that creates a pointer with metadata in the top byte
      and dereferences it with a live process and with a corefile.
      
      rdar://123784501
      52557bce
    • Timm Bäder's avatar
      [clang][Interp] Strip _Atomic from _Complex types · 797994da
      Timm Bäder authored
      ... when doing binary operations on them.
      797994da
    • Timm Bäder's avatar
    • Jonas Paulsson's avatar
      [MachineCombiner] Don't ignore PHI depths (#82025) · 6588ac30
      Jonas Paulsson authored
      The depths of the Root and the NewRoot are to be compared in
      MachineCombiner::improvesCriticalPathLen(), and while the call to
      BlockTrace.getInstrCycles(*Root) includes the Depth of a PHI, for some
      reason PHI nodes have been ignored in getOperandDef(). 
      
      This patch removes the special handling of PHIs in getOperandDef() so that
      Root and NewRoot get a fair comparison. This does not affect loop headers
      as MachineTraceMetrics handles that case by ignoring incoming PHI edges.
      6588ac30
    • Sam McCall's avatar
      [clang][nullability] allow _Nonnull etc on nullable class types (#82705) · 92a09c01
      Sam McCall authored
      This enables clang and external nullability checkers to make use of
      these annotations on nullable C++ class types like unique_ptr.
      
      These types are recognized by the presence of the _Nullable attribute.
      Nullable standard library types implicitly receive this attribute.
      
      Existing static warnings for raw pointers are extended to smart
      pointers:
      
      - nullptr used as return value or argument for non-null functions
        (`-Wnonnull`)
      - assigning or initializing nonnull variables with nullable values
        (`-Wnullable-to-nonnull-conversion`)
      
      It doesn't implicitly add these attributes based on the assume_nonnull
      pragma, nor warn on missing attributes where the pragma would apply
      them.
      I'm not confident that the pragma's current behavior will work well for
      C++ (where type-based metaprogramming is much more common than C/ObjC).
      We'd like to revisit this once we have more implementation experience.
      
      Support can be detected as `__has_feature(nullability_on_classes)`.
      This is needed for back-compatibility, as previously clang would issue a
      hard error when _Nullable appears on a smart pointer.
      
      UBSan's `-fsanitize=nullability` will not check smart-pointer types.
      It can be made to do so by synthesizing calls to `operator bool`, but
      that's left for future work.
      
      Discussion:
      https://discourse.llvm.org/t/rfc-allowing-nonnull-etc-on-smart-pointers/77201/26
      92a09c01