-
Notifications
You must be signed in to change notification settings - Fork 355
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
Implement the mmap64
foreign item.
#3285
Conversation
d5d3e99
to
06bdcfc
Compare
`mmap64` is like `mmap` but uses a 64-bit integer instead of `off_t` for the offset parameter.
06bdcfc
to
3fdb685
Compare
Can we avoid a copy+paste of all the mmap tests by doing something like |
@rustbot author |
`mmap64` is only defined on Linux, so move the implementation to Linux-specific code.
@@ -217,6 +218,14 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { | |||
this.write_null(dest)?; | |||
} | |||
|
|||
"mmap64" => { |
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.
You put this into the category of
// Incomplete shims that we "stub out" just to get pre-main initialization code to work.
// These shims are enabled only when the caller is in the standard library.
That doesn't seem right.
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 didn't notice that comment :-). I've now moved it to "File related shims".
Thanks! |
☀️ Test successful - checks-actions |
mmap64
is likemmap
but uses a 64-bit integer instead ofoff_t
for the offset parameter.