Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Correct outdated object size limit #127546
Correct outdated object size limit #127546
Changes from 7 commits
42dbf29
d6383b4
f4cb6ef
65f132f
28628f3
325af25
d93d2f1
cf78f26
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not entirely sure what is even meant by "object". In general we are saying that "allocated objects" are limited by
isize::MAX
, and we do not publicly document anything else even for 64bit targets. So we do currently allow people to create heap allocations larger than obj_size_bound, and we rely on LLVM supporting that. It is only Rust types that can't be any bigger, and thereforestatic
andlet
-bound variables andBox
.So either we should clarify the comment to say that this does not apply to all heap allocations, or we need to fix our docs.
@nikic will LLVM miscompile things if a heap allocation gets bigger than 2^61 bytes because that overflows
u64
when counting in bits? Or does the 2^64 bits limit only apply to LLVM "typed objects"? Or is this too theoretical because nothing can be that big anyway? ;)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would only be a problem if it's a typed allocation/access, but I'm not particularly confident in that :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anyone got a 64-bit address space computer lying around to find out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly I'm also not completely confident... I think allocation is what is meant?
I was pretty much just rolling with it because "we have a slightly wibbly definition of 'object' deep in the codegen backend" feels kinda low on our list of concerns. Relatively speaking.
This file was deleted.
This file was deleted.