Skip to content

Validate allocation upgrades and preserve clone layout - #766

Open
NoahWLono wants to merge 1 commit into
rust-lang:mainfrom
NoahWLono:fix/allocation-layout-and-clone
Open

NoahWLono wants to merge 1 commit into
rust-lang:mainfrom
NoahWLono:fix/allocation-layout-and-clone

Conversation

@NoahWLono

Copy link
Copy Markdown

Validate the full table layout before using extra space returned by an allocator. If the larger layout does not fit, keep the originally requested layout.

Keep the clone destination’s bucket count equal to the source’s so the copy uses matching layouts.

The existing suite passed with cargo test and cargo test --release. cargo fmt --check also passed.

Prepared with AI assistance.

@clarfonthey

Copy link
Copy Markdown
Contributor

Hi, we haven't yet updated the docs for this repo but we follow the same LLM policy as the rust-lang/rust repo, which means that we'd like a little more clarification on LLM usage disclosure.

Right now, it's unclear why you want this change specifically and it would be nice to have clarification on that as well. I can understand for performance reasons that it would be nice to make clones preserve layout (no need to rehash), but I don't think this PR actually takes those potential improvements into account.

@NoahWLono

Copy link
Copy Markdown
Author

I spoke with the rust security mailbox and triaged this with them, and one of the maintainers told me to make a public PR.

GLM 5.3 assistance

@clarfonthey

Copy link
Copy Markdown
Contributor

This isn't a security issue, correct. But why is it an issue at all?

In terms of disclosure, I would recommend you actually read the linked policy to understand why I asked, because that doesn't actually answer my question.

This branch has not been deployed

No deployments
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