Skip to content

Add compile fail test for issue 27675 - #77663

Merged
bors merged 1 commit into
rust-lang:masterfrom
197g:regression-tests-27675-object-safe
Oct 9, 2020
Merged

Add compile fail test for issue 27675#77663
bors merged 1 commit into
rust-lang:masterfrom
197g:regression-tests-27675-object-safe

Conversation

@197g

@197g197g commented Oct 7, 2020

Copy link
Copy Markdown
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
Copy Markdown
Member

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

@JohnTitorJohnTitor added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 7, 2020
Comment threadsrc/test/compile-fail/issue-27576.rs Outdated
@197g
197gforce-pushed the regression-tests-27675-object-safe branch from 8a44ce1 to ea206f2CompareOctober 8, 2020 06:19
@Aaron1011

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Oct 8, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit ea206f2 has been approved by Aaron1011

@borsbors 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:masterOct 9, 2020
@rustbotrustbot added this to the 1.49.0 milestone Oct 9, 2020
@197g
197g deleted the regression-tests-27675-object-safe branch October 9, 2020 06:51
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: 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

@197g@JohnTitor@Aaron1011@bors@rustbot