rust-lang / miri

An interpreter for Rust's mid-level intermediate representation
Apache License 2.0
4.18k stars 323 forks source link

Add localtime_r shim #3461

Closed tiif closed 2 months ago

tiif commented 3 months ago

Note:

tiif commented 3 months ago

@RalfJung @oli-obk If memory leak in tm_zone string is a concern, would it be better if we just don't update the tm_zone field at all? The implementation provided is not accurate most of the time anyway since I didn't manage to use timezone abbreviation, I put something like +08 instead.

tiif commented 3 months ago

Thanks for the thorough review! I need a little bit more time to fully address them, and will mark this pr as ready after that.

tiif commented 3 months ago

Sorry for submitting so many comments one go, I didn't notice that these comments are under pending, and only visible to me :(

rustbot commented 3 months ago

There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged.

You can start a rebase with the following commands:

$ # rebase
$ git rebase -i master
$ # delete any merge commits in the editor that appears
$ git push --force-with-lease

The following commits are merge commits:

RalfJung commented 3 months ago

@rustbot author

rustbot commented 3 months ago

There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged.

You can start a rebase with the following commands:

$ # rebase
$ git rebase -i master
$ # delete any merge commits in the editor that appears
$ git push --force-with-lease

The following commits are merge commits (since this message was last posted):

tiif commented 3 months ago

@rustbot ready

rustbot commented 2 months ago

There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged.

You can start a rebase with the following commands:

$ # rebase
$ git rebase -i master
$ # delete any merge commits in the editor that appears
$ git push --force-with-lease

The following commits are merge commits (since this message was last posted):

RalfJung commented 2 months ago

All right, looks good. Thanks! Please rebase and squash.

RalfJung commented 2 months ago

@bors r+

bors commented 2 months ago

:pushpin: Commit 90b408c9d4fdf75dd50e0f2842604898c43351b4 has been approved by RalfJung

It is now in the queue for this repository.

bors commented 2 months ago

:hourglass: Testing commit 90b408c9d4fdf75dd50e0f2842604898c43351b4 with merge 887088106bbe062b2e664b260b61bbc244cd64b8...

tiif commented 2 months ago

Thanks @RalfJung and @oli-obk for mentoring this PR! I really learned a lot from the detailed suggestion and discovered a lot of new Rust syntax that I never used before. I will be away preparing for final exams until 1 May, and I will start working on socketpair by then.

bors commented 2 months ago

:sunny: Test successful - checks-actions Approved by: RalfJung Pushing 887088106bbe062b2e664b260b61bbc244cd64b8 to master...

bors commented 2 months ago

:sunny: Test successful - checks-actions Approved by: RalfJung Pushing 887088106bbe062b2e664b260b61bbc244cd64b8 to master...