| Issue |
184543
|
| Summary |
[clang][PAC] Functions marked with __ptrauth do not have trivial layout
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
dtapuska
|
Building using the Apple iOS SDK 26.2 with upstream clang.
malloc.h defines:
// Introspection function pointer, address- and type-diversified.
// Process-independent because the malloc_introspection_t structure that contains
// these pointers may be in the shared library cache.
#define MALLOC_INTROSPECT_FN_PTR(fn) __ptrauth(ptrauth_key_process_independent_code, \
1, ptrauth_string_discriminator("malloc_introspect_fn." #fn)) fn
If I create:
typedef size_t (*MALLOC_INTROSPECT_FN_PTR(
good_size_fn_type))(struct _malloc_zone_t* zone, size_t size);
struct TestZone {
good_size_fn_type good_size;
};
The following will fail when the target is arm64e but succeed when it is arm64.
static_assert(std::is_standard_layout_v<TestZone>, "POD");
@ojhunt Should this be treated as having standard layout?
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs