-
Notifications
You must be signed in to change notification settings - Fork 356
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
Use deref_pointer_as instead of deref_pointer #4140
base: master
Are you sure you want to change the base?
Conversation
@RalfJung since libc isn't reliably available on Windows targets, I won't be able to get windows specific |
Yeah |
Wait, did you add more I will have to do a complete re-review, and since I am traveling this will take at least a week, maybe two. |
Sorry for not mentioning earlier that the PR is incomplete and making you review it unnecessarily. I have now made all the changes except for the windows part.
I am not in a hurry, do re-review whenever you are free. |
@RalfJung plz review this. |
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.
Almost there :)
@@ -132,16 +132,14 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { | |||
this.assert_target_os_is_unix("localtime_r"); | |||
this.check_no_isolation("`localtime_r`")?; | |||
|
|||
let timep = this.deref_pointer(timep)?; | |||
let timep_layout = this.libc_ty_layout("time_t"); |
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.
let timep_layout = this.libc_ty_layout("time_t"); | |
let time_layout = this.libc_ty_layout("time_t"); |
This is not the layout of a pointer, after all. timep
is just a pointer-to-time.
@@ -85,7 +86,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { | |||
|
|||
let id = this.init_once_get_data(init_once_op)?.id; | |||
let flags = this.read_scalar(flags_op)?.to_u32()?; | |||
let pending_place = this.deref_pointer(pending_op)?; | |||
// PBOOL is a typedef of int |
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.
// PBOOL is a typedef of int | |
// PBOOL is int* |
@rustbot author |
Links to #3841.
This PR is still under progress.