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

A simple program involving BTreeSet runs out of memory #705

Closed
zhassan-aws opened this issue Dec 17, 2021 · 3 comments · Fixed by #1941
Closed

A simple program involving BTreeSet runs out of memory #705

zhassan-aws opened this issue Dec 17, 2021 · 3 comments · Fixed by #1941
Labels
[E] Performance Track performance improvement (Time / Memory / CPU) T-CBMC Issue related to an existing CBMC issue T-MLP Should Have

Comments

@zhassan-aws
Copy link
Contributor

I tried this code:

use std::collections::BTreeSet;

fn main() {
    let mut set = BTreeSet::<u32>::new();
    set.insert(0);
}

using the following command line invocation:

rmc test.rs --unwind 2

with RMC version: 8de5cd67609

CBMC memory usage went up to 20GB after 1 minute and reached ~30 GB shortly after.

@zhassan-aws zhassan-aws added the [C] Bug This is a bug. Something isn't working. label Dec 17, 2021
@zhassan-aws zhassan-aws added T-MLP Need Triage MLP - Must Have T-MLP Should Have [E] Performance Track performance improvement (Time / Memory / CPU) and removed T-MLP Need Triage [C] Bug This is a bug. Something isn't working. MLP - Must Have labels Mar 14, 2022
@zhassan-aws
Copy link
Contributor Author

This got fixed by f088f9c, in particular the switch to use assert-false-assume-false for undefined functions as opposed to just assert-false.

@zhassan-aws
Copy link
Contributor Author

Reopening: with e4851c1, memory usage exceeds 20 GB with an unwind of 3. With an unwind of 2, it finishes in a few minutes, but an unwinding assertion fails.

@zhassan-aws zhassan-aws reopened this Nov 16, 2022
@tautschnig
Copy link
Member

The changes in #1676 make an unwinding 2 terminate in 2.4 seconds (with the expected unwinding failure). An unwinding of 3 takes 3.1 seconds, no more unwinding failures.

tautschnig added a commit to tautschnig/cbmc that referenced this issue Nov 16, 2022
These are struct- and union expressions, or possible empty_union_exprt.
Creating constant_exprt resulted in a segmentation fault in simplifying
member expressions, as witnessed when working on
model-checking/kani#705.
tautschnig added a commit to tautschnig/cbmc that referenced this issue Nov 16, 2022
These are struct- and union expressions, or possible empty_union_exprt.
Creating constant_exprt resulted in a segmentation fault in simplifying
member expressions, as witnessed when working on
model-checking/kani#705.
@tedinski tedinski added the T-CBMC Issue related to an existing CBMC issue label Dec 6, 2022
zhassan-aws added a commit to zhassan-aws/kani that referenced this issue Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[E] Performance Track performance improvement (Time / Memory / CPU) T-CBMC Issue related to an existing CBMC issue T-MLP Should Have
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants