@@ -2341,8 +2341,15 @@ llvm::Value *CodeGenFunction::EmitDynamicCast(Address
ThisAddr,
} else if (IsExact) {
// If the destination type is effectively final, this pointer points to the
// right type if and only if its vptr has the right value.
-Value = CGM.getCXX
https://github.com/ojhunt edited
https://github.com/llvm/llvm-project/pull/148576
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ojhunt wrote:
> Please update `clang/docs/LanguageExtensions.rst`.
Good point, also as it got dropped from C++26 I'm restoring and updating the in
tree docs as well.
https://github.com/llvm/llvm-project/pull/148576
___
cfe-commits mailing list
cfe-co
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/148576
>From d86fea4e16dc9962f87a8969e74b62767476ec30 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Mon, 14 Jul 2025 00:26:08 -0700
Subject: [PATCH 1/3] [clang] Update diagnostics for type aware allocators
Alas refl
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/148576
>From d86fea4e16dc9962f87a8969e74b62767476ec30 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Mon, 14 Jul 2025 00:26:08 -0700
Subject: [PATCH 1/2] [clang] Update diagnostics for type aware allocators
Alas refl
https://github.com/ojhunt created
https://github.com/llvm/llvm-project/pull/148576
Alas reflection pushed p2719 out of C++26, so this PR changes the diagnostics
to reflect that for now type aware allocation is functionally a clang extension.
>From d86fea4e16dc9962f87a8969e74b62767476ec30 Mon S
@@ -2341,8 +2341,15 @@ llvm::Value *CodeGenFunction::EmitDynamicCast(Address
ThisAddr,
} else if (IsExact) {
// If the destination type is effectively final, this pointer points to the
// right type if and only if its vptr has the right value.
-Value = CGM.getCXX
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/147899
>From 0d38b0d9b153bfb55c199d3bb4b6cdca2f708af9 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 9 Jul 2025 17:30:48 -0700
Subject: [PATCH 1/4] [clang][ObjC][PAC] Add ptrauth protections to objective-c
This
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/147899
>From 0d38b0d9b153bfb55c199d3bb4b6cdca2f708af9 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 9 Jul 2025 17:30:48 -0700
Subject: [PATCH 1/3] [clang][ObjC][PAC] Add ptrauth protections to objective-c
This
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/147899
>From 0d38b0d9b153bfb55c199d3bb4b6cdca2f708af9 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 9 Jul 2025 17:30:48 -0700
Subject: [PATCH 1/2] [clang][ObjC][PAC] Add ptrauth protections to objective-c
This
ojhunt wrote:
dammit habitually force pushed a squash and rebase. #skilled.
https://github.com/llvm/llvm-project/pull/147899
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/147899
>From 0d38b0d9b153bfb55c199d3bb4b6cdca2f708af9 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 9 Jul 2025 17:30:48 -0700
Subject: [PATCH] [clang][ObjC][PAC] Add ptrauth protections to objective-c
This PR i
https://github.com/ojhunt created
https://github.com/llvm/llvm-project/pull/147938
Make sure to mark a concept decl as being invalid if the constraint is invalid.
>From 8beb2eeab5270df51408d233d90d89be735b1828 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Thu, 10 Jul 2025 03:57:32 -0700
Sub
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/147899
>From 3b0a91c3d4a4ae8ec7980d2201d94f59746fb769 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 9 Jul 2025 17:30:48 -0700
Subject: [PATCH] [clang][ObjC][PAC] Add ptrauth protections to objective-c
This PR i
ojhunt wrote:
Re: the oracle concerns - there are some protections we have, but in general I
think the current pointer auth semantics/diagnostics make it too easy to
silently introduce oracles. Additionally a lot of the current unwind
pointerauth work is focused on protecting the ABI boundarie
ojhunt wrote:
I'll be back to working on this later today - there's a pile of feedback, and a
bunch of nonsense that I managed to accidentally accrue and/or re-format when
pushing the PR so it will take a little time to unbreak that. It may be easiest
to force push a repaired PR first and then
https://github.com/ojhunt approved this pull request.
r=me
https://github.com/llvm/llvm-project/pull/145655
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ojhunt wrote:
@vbvictor super sorry, I'm feeling quite sick so can't really read the PR
today, will probably not get to it until tomorrow
https://github.com/llvm/llvm-project/pull/144270
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://
@@ -30,6 +30,46 @@ EXCEPTION_DISPOSITION
_GCC_specific_handler(PEXCEPTION_RECORD, void *, PCONTEXT,
_Unwind_Personality_Fn);
#endif
+#if __has_include()
+#include
+#endif
+
+#if defined(__APPLE__) && __has_feature(ptrauth_qualifier
@@ -1877,6 +1946,32 @@ inline Registers_arm64::Registers_arm64(const void
*registers) {
memcpy(_vectorHalfRegisters,
static_cast(registers) + sizeof(GPRs),
sizeof(_vectorHalfRegisters));
+#if __has_feature(ptrauth_calls)
ojhunt wrote:
- [
@@ -93,6 +98,13 @@ class _LIBUNWIND_HIDDEN Registers_x86 {
uint32_t getEDI() const { return _registers.__edi; }
void setEDI(uint32_t value) { _registers.__edi = value; }
+ typedef uint32_t reg_t;
+ typedef uint32_t link_reg_t;
+ void loadAndAuthenticateLin
@@ -1845,10 +1871,53 @@ class _LIBUNWIND_HIDDEN Registers_arm64 {
uint64_t getSP() const { return _registers.__sp; }
void setSP(uint64_t value) { _registers.__sp = value; }
- uint64_t getIP() const { return _registers.__pc; }
- void setIP(uint
@@ -1845,10 +1871,53 @@ class _LIBUNWIND_HIDDEN Registers_arm64 {
uint64_t getSP() const { return _registers.__sp; }
void setSP(uint64_t value) { _registers.__sp = value; }
- uint64_t getIP() const { return _registers.__pc; }
- void setIP(uint
@@ -83,7 +83,13 @@ __llvm_profile_iterate_data(const __llvm_profile_data *Data)
{
/* This method is only used in value profiler mock testing. */
COMPILER_RT_VISIBILITY void *
__llvm_get_function_addr(const __llvm_profile_data *Data) {
- return Data->FunctionPointer;
+ void
@@ -1845,10 +1871,53 @@ class _LIBUNWIND_HIDDEN Registers_arm64 {
uint64_t getSP() const { return _registers.__sp; }
void setSP(uint64_t value) { _registers.__sp = value; }
- uint64_t getIP() const { return _registers.__pc; }
- void setIP(uint
@@ -83,7 +83,13 @@ __llvm_profile_iterate_data(const __llvm_profile_data *Data)
{
/* This method is only used in value profiler mock testing. */
COMPILER_RT_VISIBILITY void *
__llvm_get_function_addr(const __llvm_profile_data *Data) {
- return Data->FunctionPointer;
+ void
@@ -694,7 +705,12 @@
DEFINE_LIBUNWIND_FUNCTION(__libunwind_Registers_arm64_jumpto)
gcspushm x30
Lnogcs:
#endif
+
+#if __has_feature(ptrauth_calls)
+ retab
+#else
ojhunt wrote:
see earlier comment - do we want to just adopt a single flag instead of the
cur
@@ -1877,6 +1946,32 @@ inline Registers_arm64::Registers_arm64(const void
*registers) {
memcpy(_vectorHalfRegisters,
static_cast(registers) + sizeof(GPRs),
sizeof(_vectorHalfRegisters));
+#if __has_feature(ptrauth_calls)
+ uint64_t pcRegister = 0;
+ memcp
ojhunt wrote:
Converting to draft so I don't accidentally hit the big green commit button
(that is big and green despite no approvals ?!?!)
https://github.com/llvm/llvm-project/pull/144420
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:
https://github.com/ojhunt converted_to_draft
https://github.com/llvm/llvm-project/pull/144420
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ojhunt wrote:
> It is very common for type traits to factor into the ABI of a template
> specialization, such that `my_variant` has a different layout depending on
> `is_amazing_v`. That is why changing the value of a type trait generally
> has to be considered an ABI break.
ah right, it's no
ojhunt wrote:
> I think we should make a point of implementing this for address-discriminated
> `__ptrauth` qualifiers before we release it, because changing the type trait
> in a future release will be an ABI break.
I had been talking to @cor3ntin and decided we could do it later as this is a
@@ -4467,17 +4467,25 @@ RValue CodeGenFunction::EmitBuiltinExpr(const
GlobalDecl GD, unsigned BuiltinID,
case Builtin::BI__builtin_trivially_relocate:
case Builtin::BImemmove:
case Builtin::BI__builtin_memmove: {
+QualType CopiedType = E->getArg(0)->getType()->getPoi
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/144420
>From b43a7e9295dfdbe0a11fb7dff669b82d8ed0630c Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Mon, 16 Jun 2025 20:48:57 +0300
Subject: [PATCH 1/2] [clang][PAC] Support trivially_relocating polymorphic
objects
@@ -420,6 +420,222 @@ void
CodeGenFunction::EmitPointerAuthCopy(PointerAuthQualifier Qual, QualType T,
Builder.CreateStore(Value, DestAddress);
}
+static const ConstantArrayType *tryGetTypeAsConstantArrayType(QualType T) {
+ if (!T->isConstantArrayType())
+return nullp
@@ -1727,6 +1727,11 @@ ASTContext::PointerAuthContent
ASTContext::findPointerAuthContent(QualType T) {
T = T.getCanonicalType();
if (T.hasAddressDiscriminatedPointerAuth())
return PointerAuthContent::AddressDiscriminatedData;
+
+ T = getBaseElementType(T).getCanonical
https://github.com/ojhunt created
https://github.com/llvm/llvm-project/pull/144420
Adds support for trivial relocation of polymorphic objects with address
discriminated vtable pointers.
This is implemented as a post-memmove fixup pass over the impacted objects. We
do this by traversing the ob
ojhunt wrote:
> LLVM Buildbot has detected a new failure on builder
> `ppc64le-flang-rhel-clang` running on `ppc64le-flang-rhel-test` while
> building `clang` at step 6 "test-build-unified-tree-check-flang".
>
> Full details are available at:
> https://lab.llvm.org/buildbot/#/builders/157/bui
https://github.com/ojhunt closed
https://github.com/llvm/llvm-project/pull/143969
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/143969
>From f47680310ed68a9f8e8cb15bc1cd474740072463 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Thu, 12 Jun 2025 13:17:11 -0700
Subject: [PATCH 1/7] [clang] Fix PointerAuth semantics of
cpp_trivially_relocatable
@@ -629,25 +629,46 @@ class ASTContext : public RefCountedBase {
void setRelocationInfoForCXXRecord(const CXXRecordDecl *,
CXXRecordDeclRelocationInfo);
- /// Examines a given type, and returns whether the T itself
+ /// Examines a give
@@ -629,25 +629,46 @@ class ASTContext : public RefCountedBase {
void setRelocationInfoForCXXRecord(const CXXRecordDecl *,
CXXRecordDeclRelocationInfo);
- /// Examines a given type, and returns whether the T itself
+ /// Examines a give
@@ -629,25 +629,46 @@ class ASTContext : public RefCountedBase {
void setRelocationInfoForCXXRecord(const CXXRecordDecl *,
CXXRecordDeclRelocationInfo);
- /// Examines a given type, and returns whether the T itself
+ /// Examines a give
https://github.com/ojhunt approved this pull request.
Looks reasonable to me -- I spent a bunch of time trying to induce some case
where this would do the wrong thing and I couldn't come up with anything as all
the failure modes that would be possible outside of constexpr already fail in
const
@@ -2753,10 +2753,18 @@ static bool resolveAllocationOverloadInterior(
if (Diagnose) {
// If this is an allocation of the form 'new (p) X' for some object
// pointer p (or an expression that will decay to such a pointer),
- // diagnose the missing inclusion
https://github.com/ojhunt requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/144270
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2753,10 +2753,18 @@ static bool resolveAllocationOverloadInterior(
if (Diagnose) {
// If this is an allocation of the form 'new (p) X' for some object
// pointer p (or an expression that will decay to such a pointer),
- // diagnose the missing inclusion
ojhunt wrote:
Sure thing :D
https://github.com/llvm/llvm-project/pull/144247
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ojhunt closed
https://github.com/llvm/llvm-project/pull/144247
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ojhunt approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/144247
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/143969
>From f47680310ed68a9f8e8cb15bc1cd474740072463 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Thu, 12 Jun 2025 13:17:11 -0700
Subject: [PATCH 1/6] [clang] Fix PointerAuth semantics of
cpp_trivially_relocatable
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/143969
>From f47680310ed68a9f8e8cb15bc1cd474740072463 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Thu, 12 Jun 2025 13:17:11 -0700
Subject: [PATCH 1/5] [clang] Fix PointerAuth semantics of
cpp_trivially_relocatable
ojhunt wrote:
found how to unmark the approval as the next update will change this fairly
substantially
https://github.com/llvm/llvm-project/pull/143969
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/lis
ojhunt wrote:
Actually I've given this a lot of thought, I think we should not consider
explicitly __ptrauth qualified types to be relocatable, how does that sound?
https://github.com/llvm/llvm-project/pull/143969
___
cfe-commits mailing list
cfe-comm
ojhunt wrote:
Very glad I didn't just assume my local build was sufficient and waited for the
bots :D
https://github.com/llvm/llvm-project/pull/143969
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listi
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/143969
>From f47680310ed68a9f8e8cb15bc1cd474740072463 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Thu, 12 Jun 2025 13:17:11 -0700
Subject: [PATCH 1/4] [clang] Fix PointerAuth semantics of
cpp_trivially_relocatable
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/143969
>From f47680310ed68a9f8e8cb15bc1cd474740072463 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Thu, 12 Jun 2025 13:17:11 -0700
Subject: [PATCH 1/3] [clang] Fix PointerAuth semantics of
cpp_trivially_relocatable
@@ -628,10 +628,13 @@ class ASTContext : public RefCountedBase {
getRelocationInfoForCXXRecord(const CXXRecordDecl *) const;
void setRelocationInfoForCXXRecord(const CXXRecordDecl *,
CXXRecordDeclRelocationInfo);
+ bool containsAddressD
@@ -15121,6 +15155,21 @@ ASTContext::baseForVTableAuthentication(const
CXXRecordDecl *ThisClass) {
return PrimaryBase;
}
+bool ASTContext::hasAddressDiscriminatedVTableAuthentication(
ojhunt wrote:
Which function?
https://github.com/llvm/llvm-project/pull
@@ -1705,6 +1705,40 @@ void ASTContext::setRelocationInfoForCXXRecord(
RelocatableClasses.insert({D, Info});
}
+bool ASTContext::containsAddressDiscriminatedPointerAuth(QualType T) {
+ if (!LangOpts.PointerAuthCalls && !LangOpts.PointerAuthIntrinsics)
+return false;
+
+
https://github.com/ojhunt edited
https://github.com/llvm/llvm-project/pull/143969
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/143969
>From f47680310ed68a9f8e8cb15bc1cd474740072463 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Thu, 12 Jun 2025 13:17:11 -0700
Subject: [PATCH 1/2] [clang] Fix PointerAuth semantics of
cpp_trivially_relocatable
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/143969
>From f47680310ed68a9f8e8cb15bc1cd474740072463 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Thu, 12 Jun 2025 13:17:11 -0700
Subject: [PATCH 1/2] [clang] Fix PointerAuth semantics of
cpp_trivially_relocatable
@@ -557,7 +596,19 @@ set_registers(_Unwind_Exception* unwind_exception,
_Unwind_Context* context,
reinterpret_cast(unwind_exception));
_Unwind_SetGR(context, __builtin_eh_return_data_regno(1),
static_cast(results.ttypeIndex));
+#if defined(__A
@@ -807,7 +812,12 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext)
strd31, [x0, #0x208]
#endif
movx0, #0 // return UNW_ESUCCESS
+
+#if __has_feature(ptrauth_calls)
+ retab
+#else
ojhunt wrote:
This is what we have downstream, i
@@ -126,6 +130,36 @@ _LIBUNWIND_HIDDEN int __unw_set_reg(unw_cursor_t *cursor,
unw_regnum_t regNum,
// First, get the FDE for the old location and then update it.
co->getInfo(&info);
co->setInfoBasedOnIPRegister(false);
+
+#if __has_feature(ptrauth_calls)
+
@@ -32,22 +32,23 @@
#endif
#if defined(_WIN32)
- #if defined(_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS) ||
(defined(__MINGW32__) && !defined(_LIBCXXABI_BUILDING_LIBRARY))
- #define _LIBCXXABI_HIDDEN
- #define _LIBCXXABI_DATA_VIS
- #define _LIBCXXABI_FUNC_VIS
- #define _LI
@@ -32,22 +32,23 @@
#endif
#if defined(_WIN32)
- #if defined(_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS) ||
(defined(__MINGW32__) && !defined(_LIBCXXABI_BUILDING_LIBRARY))
- #define _LIBCXXABI_HIDDEN
- #define _LIBCXXABI_DATA_VIS
- #define _LIBCXXABI_FUNC_VIS
- #define _LI
https://github.com/ojhunt created
https://github.com/llvm/llvm-project/pull/143969
This adds a function to ASTContext to query whether a type contains values with
address discriminated pointer auth, and performs the required semantic checks
to ensure correct reporting of relocatablity in those
https://github.com/ojhunt closed
https://github.com/llvm/llvm-project/pull/143796
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ojhunt wrote:
Closing this PR because there's a lot of noise in it that is just completely
reverted/gone at this point.
https://github.com/llvm/llvm-project/pull/143796
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi
@@ -292,77 +294,129 @@ Sema::CheckCXX2CRelocatableAndReplaceable(const
CXXRecordDecl *D) {
return HasSuitableSMP();
// is a union with no user-declared special member functions, or
-if (IsUnion())
+if (IsTrivialUnion())
return HasSuitableSMP();
@@ -292,77 +294,129 @@ Sema::CheckCXX2CRelocatableAndReplaceable(const
CXXRecordDecl *D) {
return HasSuitableSMP();
// is a union with no user-declared special member functions, or
-if (IsUnion())
+if (IsTrivialUnion())
return HasSuitableSMP();
@@ -10615,7 +10615,7 @@ void Sema::checkIllFormedTrivialABIStruct(CXXRecordDecl
&RD) {
}
}
- if (IsCXXTriviallyRelocatableType(RD))
+ if (CheckCXX2CRelocatableAndReplaceable(&RD).IsRelocatable)
ojhunt wrote:
I think I did restore it for QualType an
@@ -621,17 +621,24 @@ class ASTContext : public RefCountedBase {
public:
struct CXXRecordDeclRelocationInfo {
+static CXXRecordDeclRelocationInfo NonRelocatable() {
+ return {false, false};
+}
+
unsigned IsRelocatable;
unsigned IsReplaceable;
-
https://github.com/ojhunt created
https://github.com/llvm/llvm-project/pull/143796
This reworks the way we compute relocatability and replaceability of types. We
do this by having a single interface the provides a full `TypeRelocationInfo`
for a QualType. This simplifies the reasoning for all
@@ -65,6 +65,17 @@ enum class PointerAuthenticationMode : unsigned {
SignAndAuth
};
+static constexpr llvm::StringLiteral PointerAuthenticationOptionStrip =
"strip";
ojhunt wrote:
ah so what @erichkeane was suggesting is that places needing the string woul
@@ -121,8 +121,10 @@ static bool hasSuitableConstructorForRelocation(Sema
&SemaRef,
CXXMethodDecl *Decl =
LookupSpecialMemberFromXValue(SemaRef, D, /*Assign=*/false);
ojhunt wrote:
Is it reasonable to have LookupSpecialMemberFromXValue simply return
ojhunt wrote:
> Thank you for the fix!
sorry for the delay, just completely forgot about it
https://github.com/llvm/llvm-project/pull/143448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
https://github.com/ojhunt closed
https://github.com/llvm/llvm-project/pull/143448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1434,10 +1446,13 @@ namespace {
QualType ArgType;
};
-unsigned NumPlacementArgs : 31;
-LLVM_PREFERRED_TYPE(bool)
+unsigned NumPlacementArgs : 30;
+LLVM_PREFERRED_TYPE(AlignedAllocationMode)
unsigned PassAlignmentToPlacementDelete : 1;
+LL
https://github.com/ojhunt created
https://github.com/llvm/llvm-project/pull/143448
The CallDeleteDuringNew::PassTypeToPlacementDelete field became unneeded during
the many refactorings of P2719 but I didn't actually remove it.
>From c1fa0ea448210ab10e71bd7b2f4dc4d575056b39 Mon Sep 17 00:00:00
@@ -1434,10 +1446,13 @@ namespace {
QualType ArgType;
};
-unsigned NumPlacementArgs : 31;
-LLVM_PREFERRED_TYPE(bool)
+unsigned NumPlacementArgs : 30;
+LLVM_PREFERRED_TYPE(AlignedAllocationMode)
unsigned PassAlignmentToPlacementDelete : 1;
+LL
@@ -2052,7 +2052,7 @@ static void DiagnoseNonTriviallyRelocatableReason(Sema
&SemaRef,
}
if (!D->hasSimpleMoveConstructor() && !D->hasSimpleCopyConstructor()) {
-const auto *Decl = cast(
+const auto *Decl = cast_or_null(
ojhunt wrote:
I didn't re
https://github.com/ojhunt edited
https://github.com/llvm/llvm-project/pull/143350
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ojhunt approved this pull request.
Looks good
https://github.com/llvm/llvm-project/pull/143350
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ojhunt wrote:
unused variable errors are likely fallout from refactoring and workaround
removals I did as part of the prep, will do some cleanup/diagnostics work later
this week.
I mostly wanted to get this available to others to see whether they were ok
adopting this rather than rolling thei
ojhunt wrote:
Updating formatting before review - had discussed with Louis and he expressed a
preference for some of it, but this llvm.org style bot complains many other
cases (likely a local config issue when I was trying to cleanup the downstream
code.
So I've updated with a direct clang-fo
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/143230
>From 637245f9be6ed0163c9129d27a572f153b6f8523 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Fri, 6 Jun 2025 18:50:28 -0700
Subject: [PATCH] [runtimes][PAC] Harden unwinding when possible (#138571)
This harde
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/143230
>From 68103962b254565fdfad069c350af90ede7109b4 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Fri, 6 Jun 2025 18:50:28 -0700
Subject: [PATCH] [runtimes][PAC] Harden unwinding when possible (#138571)
This harde
ojhunt wrote:
I've finally got our downstream hardening to the point where it should be sane:
https://github.com/llvm/llvm-project/pull/143230
https://github.com/llvm/llvm-project/pull/113368
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
htt
https://github.com/ojhunt created
https://github.com/llvm/llvm-project/pull/143230
This hardens the unwinding logic and datastructures on systems that support
pointer authentication.
The approach taken to hardening is to harden the schemas of as many high value
fields in the myriad structs as
ojhunt wrote:
This obviously cases https://github.com/llvm/llvm-project/issues/143065
@AaronBallman @erichkeane @zygoloid commented in the RFC - this change
regresses the checks in ubsan for default compilation modes in order to make
the use of sanitize=undefined easier in non-default scenario
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
>From 927380bdf377581e6e40507a12c374023352c613 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 30 Apr 2025 22:26:59 -0700
Subject: [PATCH 1/6] [clang][PAC] add support for options parameter to
__ptrauth
T
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/138482
>From ecea44f2965cda3a4e6e1ccec096066830ddfa41 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Sun, 4 May 2025 21:07:33 -0700
Subject: [PATCH 1/2] [clang][ptrauth] Add support for querying the ptrauth
schema of
@@ -605,6 +605,11 @@ KEYWORD(__private_extern__ , KEYALL)
KEYWORD(__module_private__ , KEYALL)
UNARY_EXPR_OR_TYPE_TRAIT(__builtin_ptrauth_type_discriminator,
PtrAuthTypeDiscriminator, KEYALL)
+UNARY_EXPR_OR_TYPE_TRAIT(__builtin_ptrauth_has_authentication,
P
@@ -9619,6 +9620,65 @@ ObjCInterfaceDecl *ASTContext::getObjCProtocolDecl()
const {
return ObjCProtocolClassDecl;
}
+std::optional
+ASTContext::getExplicitOrImplicitPointerAuth(QualType T) {
+ auto ExplicitQualifier = T.getPointerAuth();
ojhunt wrote:
god
@@ -9619,6 +9620,65 @@ ObjCInterfaceDecl *ASTContext::getObjCProtocolDecl()
const {
return ObjCProtocolClassDecl;
}
+std::optional
+ASTContext::getExplicitOrImplicitPointerAuth(QualType T) {
+ auto ExplicitQualifier = T.getPointerAuth();
ojhunt wrote:
- [
@@ -3981,7 +3981,9 @@ class Parser : public CodeCompletionHandler {
ExprResult ParseArrayTypeTrait();
ExprResult ParseExpressionTrait();
+ ExprResult ParseBuiltinUnaryExprOrTypeTrait(UnaryExprOrTypeTrait ExprKind);
ojhunt wrote:
... if something like `Pa
@@ -9619,6 +9620,65 @@ ObjCInterfaceDecl *ASTContext::getObjCProtocolDecl()
const {
return ObjCProtocolClassDecl;
}
+std::optional
+ASTContext::getExplicitOrImplicitPointerAuth(QualType T) {
+ auto ExplicitQualifier = T.getPointerAuth();
+ if (ExplicitQualifier.isPresent(
1 - 100 of 579 matches
Mail list logo