Skip to content

Fix reference type confusion and leak in user random engine #18718

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

Closed
wants to merge 6 commits into from

Conversation

nielsdos
Copy link
Member

No description provided.

Copy link
Member

@TimWolla TimWolla left a comment

Choose a reason for hiding this comment

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

Oh god. Whether or not a reference is returned is not part of the signature checks?

Functional changes LGTM, some nits regarding the test, since I've taken great care to keep them consistent.

nielsdos and others added 4 commits May 31, 2025 13:51
@nielsdos nielsdos closed this in 75cea65 May 31, 2025
@Girgias
Copy link
Member

Girgias commented May 31, 2025

Oh god. Whether or not a reference is returned is not part of the signature checks?

It is, but you cannot make a by-ref return function return by-val: https://3v4l.org/2OmEj
But you can promote a by-val to by-ref return.

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

Successfully merging this pull request may close these issues.

3 participants