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

Prevent calling stack closures through immutable & pointers. #7836

Closed
bblum opened this issue Jul 16, 2013 · 3 comments
Closed

Prevent calling stack closures through immutable & pointers. #7836

bblum opened this issue Jul 16, 2013 · 3 comments
Labels
A-lifetimes Area: Lifetimes / regions A-type-system Area: Type system I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Milestone

Comments

@bblum
Copy link
Contributor

bblum commented Jul 16, 2013

This is the last hole left over in the "case of the recurring closure" problem which was mostly but not quite fixed by #7363.

This program should be illegal (it isn't itself soundness-breaking, but isn't far from it):

fn bar(x: & &fn(), y: & &fn()) { (*x)(); (*y)(); }
fn foo(x: &fn()) { bar(&x, &x) }
fn main() {
        do foo || {}
}

Nominating backwards-compatible.

@catamorphism
Copy link
Contributor

Accepted for backwards compatible

@nikomatsakis
Copy link
Contributor

cc #2202

@nikomatsakis
Copy link
Contributor

Closing as dup of #12224 which is more modern and has a better test case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lifetimes Area: Lifetimes / regions A-type-system Area: Type system I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Projects
None yet
Development

No branches or pull requests

3 participants