Skip to content

Conversation

@nate-chandler
Copy link
Contributor

Use all 32 bits of malloc_type_descriptor_t's hash.

Copy link
Contributor

@aschwaighofer aschwaighofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember ptrauth code paths also using the getDiscriminatorForString function. We should not change the value the ptrauth uses.

I think we should have a separate function from getDiscriminatorForString used by type id code paths only that uses 32bit.

Produce a value of 0 when typed-malloc is disabled to avoid spurious
materialization of type ids with more interesting values.
@nate-chandler nate-chandler force-pushed the malloc-type-id-32-bits branch from c61e8c1 to f0f9b56 Compare October 30, 2025 18:23
@nate-chandler
Copy link
Contributor Author

Fixed.

@nate-chandler
Copy link
Contributor Author

swiftlang/llvm-project#11724

@swift-ci please test

Copy link
Contributor

@aschwaighofer aschwaighofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants