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

Stack overflow for mutually recursive specifications #1426

Open
vfukala opened this issue Jul 11, 2023 · 0 comments
Open

Stack overflow for mutually recursive specifications #1426

vfukala opened this issue Jul 11, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@vfukala
Copy link

vfukala commented Jul 11, 2023

On

use prusti_contracts::*;

#[pure]
#[requires(g())]
fn f() -> bool {
    unreachable!()
}

#[pure]
#[requires(f())]
fn g() -> bool {
    unreachable!()
}

fn main() {}

, Prusti overflows the stack:

  __          __        __  ___             
 |__)  _\/_  |__) |  | /__`  |   ____\/_  | 
 |      /\   |  \ \__/ .__/  |       /\   | 

Prusti version: 0.2.2, commit d3dc99990e2 2023-06-26 14:59:58 UTC, built on 2023-07-01 23:37:13 UTC
Verification of 3 items...

thread 'rustc' has overflowed its stack
fatal runtime error: stack overflow

Note that Prusti also produces an unexpected internal error on

use prusti_contracts::*;

#[pure]
#[requires(f())]
fn f() -> bool {
    unreachable!()
}

fn main() {}

, but I think this is the same kind of error as the one expected in prusti-tests/tests/verify_partial/fail/issues/issues-769.rs.

@fpoli fpoli added the bug Something isn't working label Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants