Skip to content
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

URGENT: patch out RawDir for the next release too #472

Closed
SUPERCILEX opened this issue Dec 5, 2022 · 3 comments · Fixed by #474
Closed

URGENT: patch out RawDir for the next release too #472

SUPERCILEX opened this issue Dec 5, 2022 · 3 comments · Fixed by #474

Comments

@SUPERCILEX
Copy link
Contributor

@sunfishcode pretty sure I done goofed again. Was listening to the ghost cell podcast and Ralf talked about how you can access all of the elements of the Iterator at the same time thanks to the non-aliasing references. Anyway, I was like, "doesn't raw dir work that way since the lifetime is bound to the buffer?" And then: "Oh shit, we reuse that buffer."

TL;DR: pretty sure people can accumulate entry references into some other structure, but they'll be garbage once the buffer restarts. Need to double check tomorrow. Somehow need lifetime that is bound to the buffer so it can't be dropped but also blocks aliasing so every call to next requires dropping the previous entry.

@SUPERCILEX
Copy link
Contributor Author

Preliminary research indicates that GATs are required. Need to investigate further.

@sunfishcode
Copy link
Member

Thanks for the heads up! I've now created a 0.36 branch, so we can do 0.36 releases without pulling in the RawDir changes for now.

@SUPERCILEX
Copy link
Contributor Author

Alrighty, I put up a patch.

I think we finally got this dang thing locked down. Safety is so hard lol. 😅

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 a pull request may close this issue.

2 participants