Skip to content

Use a decent sentinel value for reference poison #37753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2021

Conversation

atrick
Copy link
Contributor

@atrick atrick commented Jun 2, 2021

Only relevant for -Xfrontend -enable-copy-propagation in debug builds.
It's only an experimental mode for now for shrinking lifetimes while
providing lldb an easy way to report a friendly error.

Goals:

  • two repetitive digits that don't look like garbage
  • less than a page, so it can never be a real pointer
  • reserve as many low bits as possible so it can't be a tagged pointer
  • not used by any other memory smashers

0x440 is 64-byte aligned which is plenty for any conceivable object
allocator.

Only relevant for -Xfrontend -enable-copy-propagation in debug builds.
It's only an experimental mode for now for shrinking lifetimes while
providing lldb an easy way to report a friendly error.

Goals:
- two repetitive digits that don't look like garbage
- less than a page, so it can never be a real pointer
- reserve as many low bits as possible so it can't be a tagged pointer
- not used by any other memory smashers

0x440 is 64-byte aligned which is plenty for any conceivable object
allocator.
@atrick atrick requested a review from adrian-prantl June 2, 2021 23:40
@atrick
Copy link
Contributor Author

atrick commented Jun 2, 2021

@swift-ci test

@swift-ci
Copy link
Contributor

swift-ci commented Jun 3, 2021

Build failed
Swift Test Linux Platform
Git Sha - 07f65f3

@atrick
Copy link
Contributor Author

atrick commented Jun 3, 2021

@swift-ci smoke test linux

@atrick atrick merged commit bfef818 into swiftlang:main Jun 3, 2021
@atrick atrick deleted the adjust-poison-sentinel branch June 3, 2021 06:50
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.

3 participants