Skip to content

Partial fix for #3369#5058

Closed
Thiez wants to merge 2 commits into
rust-lang:incomingfrom
Thiez:incoming
Closed

Partial fix for #3369#5058
Thiez wants to merge 2 commits into
rust-lang:incomingfrom
Thiez:incoming

Conversation

@Thiez

@Thiez Thiez commented Feb 20, 2013

Copy link
Copy Markdown
Contributor

I've moved all intrinsics in a single file (libcore/private/intrinsics.rs) and changed a few files to make use of this file (e.g. vec.rs: move_val_init).

Two intrinsics have been commented out:
visit_tydesc: it uses TyDesc and TyVisitor, this would create a dependency on librustc which seems undesirable.
frame_address: I really had no idea what it should look like without the legacy modes (would it even work? In several places in libcore the (legacy-modes) intrinsics were wrapped
with a normal fn) and what it was supposed to do.

Some documentation is still required, but many names are fairly self-explanatory.

rustc intrinsic. Several files in libcore have been changed to use
these intrinsics.
As of yet, none of the intrinsics are documented.
bors added a commit that referenced this pull request Feb 21, 2013
I've moved all intrinsics in a single file (libcore/private/intrinsics.rs) and changed a few files to make use of this file (e.g. vec.rs: move_val_init).

Two intrinsics have been commented out:
visit_tydesc: it uses TyDesc and TyVisitor, this would create a dependency on librustc which seems undesirable.
frame_address: I really had no idea what it should look like without the legacy modes (would it even work? In several places in libcore the (legacy-modes) intrinsics were wrapped
with a normal fn) and what it was supposed to do.

Some documentation is still required, but many names are fairly self-explanatory.
@bors bors closed this Feb 21, 2013
@sanxiyn

sanxiyn commented Feb 22, 2013

Copy link
Copy Markdown
Contributor

Cross referencing #3369.

bors added a commit to rust-lang-ci/rust that referenced this pull request May 2, 2020
Closes Issue4903

fixes rust-lang#4903.

Check list:
- [x] Followed [lint naming conventions][lint_naming]
- [x] Added passing UI tests (including committed `.stderr` file)
- [x] `cargo test` passes locally
- [x] Executed `./util/dev update_lints`
- [x] Added lint documentation
- [x] Run `./util/dev fmt`

[lint_naming]: https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints
---

changelog: implement lint that warn about single component path imports(`use ident;`).
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jun 12, 2026
…adics, r=RalfJung,folkertdev

Disable retagging for variadic arguments in const-eval

Fixes [rust-lang#5058](rust-lang/miri#5058) in Miri.

Retags occur on typed copies, which happen when we pass variadic arguments to a function. At the moment, variadic arguments receive `RetagMode::FnEntry` retags, which protects their permissions for the duration of the call. However, protection needs to be based on callee-side information, and the callee has now way of knowing what's contained within its `VaList`.

This PR disables retagging entirely when copying variable arguments. It also adds a new, passing test case that would originally fail before this change.

cc: @RalfJung, @folkertdev
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 12, 2026
…adics, r=RalfJung,folkertdev

Disable retagging for variadic arguments in const-eval

Fixes [rust-lang#5058](rust-lang/miri#5058) in Miri.

Retags occur on typed copies, which happen when we pass variadic arguments to a function. At the moment, variadic arguments receive `RetagMode::FnEntry` retags, which protects their permissions for the duration of the call. However, protection needs to be based on callee-side information, and the callee has now way of knowing what's contained within its `VaList`.

This PR disables retagging entirely when copying variable arguments. It also adds a new, passing test case that would originally fail before this change.

cc: @RalfJung, @folkertdev
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 12, 2026
…adics, r=RalfJung,folkertdev

Disable retagging for variadic arguments in const-eval

Fixes [rust-lang#5058](rust-lang/miri#5058) in Miri.

Retags occur on typed copies, which happen when we pass variadic arguments to a function. At the moment, variadic arguments receive `RetagMode::FnEntry` retags, which protects their permissions for the duration of the call. However, protection needs to be based on callee-side information, and the callee has now way of knowing what's contained within its `VaList`.

This PR disables retagging entirely when copying variable arguments. It also adds a new, passing test case that would originally fail before this change.

cc: @RalfJung, @folkertdev
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 12, 2026
…adics, r=RalfJung,folkertdev

Disable retagging for variadic arguments in const-eval

Fixes [rust-lang#5058](rust-lang/miri#5058) in Miri.

Retags occur on typed copies, which happen when we pass variadic arguments to a function. At the moment, variadic arguments receive `RetagMode::FnEntry` retags, which protects their permissions for the duration of the call. However, protection needs to be based on callee-side information, and the callee has now way of knowing what's contained within its `VaList`.

This PR disables retagging entirely when copying variable arguments. It also adds a new, passing test case that would originally fail before this change.

cc: @RalfJung, @folkertdev
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 12, 2026
…adics, r=RalfJung,folkertdev

Disable retagging for variadic arguments in const-eval

Fixes [rust-lang#5058](rust-lang/miri#5058) in Miri.

Retags occur on typed copies, which happen when we pass variadic arguments to a function. At the moment, variadic arguments receive `RetagMode::FnEntry` retags, which protects their permissions for the duration of the call. However, protection needs to be based on callee-side information, and the callee has now way of knowing what's contained within its `VaList`.

This PR disables retagging entirely when copying variable arguments. It also adds a new, passing test case that would originally fail before this change.

cc: @RalfJung, @folkertdev
rust-timer added a commit that referenced this pull request Jun 12, 2026
Rollup merge of #157622 - BorrowSanitizer:ignore-retags-variadics, r=RalfJung,folkertdev

Disable retagging for variadic arguments in const-eval

Fixes [#5058](rust-lang/miri#5058) in Miri.

Retags occur on typed copies, which happen when we pass variadic arguments to a function. At the moment, variadic arguments receive `RetagMode::FnEntry` retags, which protects their permissions for the duration of the call. However, protection needs to be based on callee-side information, and the callee has now way of knowing what's contained within its `VaList`.

This PR disables retagging entirely when copying variable arguments. It also adds a new, passing test case that would originally fail before this change.

cc: @RalfJung, @folkertdev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants