Skip to content

String de-duplication for localtime_r #4025

Closed
rust-lang/rust
#133861
@tiif

Description

@tiif

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

// FIXME: String de-duplication is needed so that we only allocate this string only once
// even when there are multiple calls to this function.

we could do:

We should have allocate_bytes which allocates a byte slice, and that should use the cache. allocate_str can call that, and transmute the result to &str.

Metadata

Metadata

Assignees

Labels

A-interpreterArea: affects the core interpreterC-enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancementE-good-first-issueA good way to start contributing, mentoring is available

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions