================ @@ -7538,6 +7538,14 @@ static bool IsEligibleForTrivialRelocation(Sema &SemaRef, if (!SemaRef.IsCXXTriviallyRelocatableType(Field->getType())) return false; } + + // FIXME: PFP should not affect trivial relocatability, instead it should + // affect the implementation of std::trivially_relocate. See: + // https://discourse.llvm.org/t/rfc-structure-protection-a-family-of-uaf-mitigation-techniques/85555/16?u=pcc + if (!SemaRef.Context.arePFPFieldsTriviallyRelocatable(D) && ---------------- ojhunt wrote:
If PFP fields are present, and we haven't yet implemented support for them in `trivially_relocate`, `IsCXXTriviallyRelocatableType` should be returning false. This is something we have to address for address discriminated pointer auth as well. https://github.com/llvm/llvm-project/pull/133538 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits