Skip to content

Conversation

RalfJung
Copy link
Member

This seems to go back all the way to the original version of this test from ten years ago... @nikomatsakis trip down memory lane? ;)

Clearly deallocation is a form of mutation so doing it to a (pointer derived from a) shared reference cannot be legal. Let's use mutable references instead.

@rustbot
Copy link
Collaborator

rustbot commented Feb 12, 2023

r? @eholk

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 12, 2023
@jyn514
Copy link
Member

jyn514 commented Feb 12, 2023

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Feb 12, 2023

📌 Commit 0ea0c90 has been approved by jyn514

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 12, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 12, 2023
fix UB in ancient test

This seems to go back all the way to the [original version of this test](https://github.com/rust-lang/rust/blob/b9aa9def858cfc66d411972b10ce3d98479acd78/src/test/run-pass/regions-mock-trans.rs) from ten years ago... `@nikomatsakis` trip down memory lane? ;)

Clearly deallocation is a form of mutation so doing it to a (pointer derived from a) shared reference cannot be legal. Let's use mutable references instead.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 12, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#107748 (refer to new home)
 - rust-lang#107842 (Patch `build/rustfmt/lib/*.so` for NixOS)
 - rust-lang#107930 (Improve JS function itemTypeFromName code a bit)
 - rust-lang#107934 (rustdoc: account for intra-doc links in `<meta name="description">`)
 - rust-lang#107943 (Document `PointerLike`)
 - rust-lang#107954 (avoid mixing accesses of ptrs derived from a mutable ref and parent ptrs)
 - rust-lang#107955 (fix UB in ancient test)
 - rust-lang#107964 (rustdoc: use tighter line height in h1 and h2)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f81cb97 into rust-lang:master Feb 13, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 13, 2023
@RalfJung RalfJung deleted the ancient-ub branch February 13, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants