[PATCH] D119296: KCFI sanitizer

Sami Tolvanen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 24 12:35:53 PDT 2022


samitolvanen added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/MachineInstr.h:265
+      PointerSumTypeMember<EIIK_PostInstrSymbol, MCSymbol *>,
+      PointerSumTypeMember<EIIK_CFIType, PointerEmbeddedInt<uint32_t, 32>>,
+      PointerSumTypeMember<EIIK_OutOfLine, ExtraInfo *>>
----------------
This fails on 32-bit architectures as `PointerEmbeddedInt` doesn't allow storing 32 bits in a 32-bit pointer:
```
  // Note: This '<' is correct; using '<=' would result in some shifts
  // overflowing their storage types.
  static_assert(Bits < sizeof(uintptr_t) * CHAR_BIT,
                "Cannot embed more bits than we have in a pointer!")
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119296/new/

https://reviews.llvm.org/D119296



More information about the cfe-commits mailing list