-
Notifications
You must be signed in to change notification settings - Fork 352
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
String de-duplication for localtime_r
#4025
Comments
@rustbot label +C-enhancement |
Done. |
Thanks for the PR! I am replying here so that the issue has at least a rough sketch of some mentoring instructions. However, adding a new string cache is the wrong approach here. We already have a deduplication machinery in Miri: So this change will have to be done in stages:
|
…str, r=RalfJung Add allocate_bytes and refactor allocate_str in InterpCx for raw byte… Fixes rust-lang/miri#4025 This PR introduces a new `allocate_bytes` function in InterpCx and refactors `allocate_str` to use it internally. This change improves memory allocation handling in the interpreter by: 1. Adding `allocate_bytes`: - Direct byte slice allocation support - Handles both mutable and immutable allocations - Maintains proper memory alignment and deduplication 2. Refactoring `allocate_str`: - Now uses `allocate_bytes` internally - Adds string-specific metadata handling - Preserves existing string allocation behavior This is part 1 of the planned changes to improve timezone string handling in Miri. A follow-up PR will update Miri's timezone logic to use this new allocation mechanism. Related: rust-lang/miri#4069
…str, r=RalfJung Add allocate_bytes and refactor allocate_str in InterpCx for raw byte… Fixes rust-lang/miri#4025 This PR introduces a new `allocate_bytes` function in InterpCx and refactors `allocate_str` to use it internally. This change improves memory allocation handling in the interpreter by: 1. Adding `allocate_bytes`: - Direct byte slice allocation support - Handles both mutable and immutable allocations - Maintains proper memory alignment and deduplication 2. Refactoring `allocate_str`: - Now uses `allocate_bytes` internally - Adds string-specific metadata handling - Preserves existing string allocation behavior This is part 1 of the planned changes to improve timezone string handling in Miri. A follow-up PR will update Miri's timezone logic to use this new allocation mechanism. Related: rust-lang/miri#4069
Rollup merge of rust-lang#133861 - shamb0:refactor_InterpCx_allocate_str, r=RalfJung Add allocate_bytes and refactor allocate_str in InterpCx for raw byte… Fixes rust-lang/miri#4025 This PR introduces a new `allocate_bytes` function in InterpCx and refactors `allocate_str` to use it internally. This change improves memory allocation handling in the interpreter by: 1. Adding `allocate_bytes`: - Direct byte slice allocation support - Handles both mutable and immutable allocations - Maintains proper memory alignment and deduplication 2. Refactoring `allocate_str`: - Now uses `allocate_bytes` internally - Adds string-specific metadata handling - Preserves existing string allocation behavior This is part 1 of the planned changes to improve timezone string handling in Miri. A follow-up PR will update Miri's timezone logic to use this new allocation mechanism. Related: rust-lang/miri#4069
No this has not been fixed yet... |
What is GitHub doing with my account? 🤔 |
It's because you pushed a commit that contains "closes: ..." to a master branch, and you have the permission to close issues here.
|
This is a long-standing GifHub design flaw. The "fixes" magic commit messages are applied when you push to the default branch of a fork. Most contributors "fix" this by not keeping their master branch up to date which is gross but better than randomly closing issues. I recently ran into the same problem and had to tweak my local workflow as a result. It's really unfortunate. |
Thanks. Very weird behavior. I have prevented accidental pushes by checking "Lock branch" and "Do not allow bypassing the above settings":
|
Since this is already brought up in #3470 (comment), I will just open a new issue for this.
To resolve the FIXME here,
miri/src/shims/time.rs
Lines 198 to 199 in 052bdcb
we could do:
The text was updated successfully, but these errors were encountered: