Skip to content
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

Add compile fail test for issue 27675 #77663

Merged

Conversation

HeroicKatora
Copy link
Contributor

A recently merged PR (#73905) strengthened the checks on bounds of associated items. This rejects the attack path of #27675 which consisted of constructing a dyn Trait<Item=T> where T would not fulfill the bounds required on Item of the Trait behind the dyn object.

This regression test, extracted from the weaponized instance, checks that this is rejected.

@JohnTitor
Copy link
Member

r? @Aaron1011 as highfive didn't set a reviewer and you commented on that issue.

@JohnTitor JohnTitor added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 7, 2020
@HeroicKatora HeroicKatora force-pushed the regression-tests-27675-object-safe branch from 8a44ce1 to ea206f2 Compare October 8, 2020 06:19
@Aaron1011
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Oct 8, 2020

📌 Commit ea206f2 has been approved by Aaron1011

@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 Oct 8, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Oct 8, 2020
…-object-safe, r=Aaron1011

Add compile fail test for issue 27675

A recently merged PR (rust-lang#73905) strengthened the checks on bounds of associated items. This rejects the attack path of rust-lang#27675 which consisted of constructing a `dyn Trait<Item=T>` where `T` would not fulfill the bounds required on `Item` of the `Trait` behind the dyn object.

This regression test, extracted from [the weaponized instance](rust-lang#27675 (comment)), checks that this is rejected.
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 8, 2020
…as-schievink

Rollup of 8 pull requests

Successful merges:

 - rust-lang#76750 (Don't discourage implementing `core::fmt::Write`)
 - rust-lang#77449 (BTreeMap: comment why drain_filter's size_hint is somewhat pessimistic)
 - rust-lang#77660 ((docs): make mutex error comment consistent with codebase)
 - rust-lang#77663 (Add compile fail test for issue 27675)
 - rust-lang#77673 (Remove unnecessary lamda on emitter map.)
 - rust-lang#77701 (Make `max_log_info` easily greppable (for figuring out why debug logging is disabled))
 - rust-lang#77702 (Remove not needed lambda.)
 - rust-lang#77710 (Update submodule llvm to get LVI bugfix)

Failed merges:

r? `@ghost`
@bors bors merged commit b1e856a into rust-lang:master Oct 9, 2020
@rustbot rustbot added this to the 1.49.0 milestone Oct 9, 2020
@HeroicKatora HeroicKatora deleted the regression-tests-27675-object-safe branch October 9, 2020 06:51
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants