Skip to content

CBMC verification failure with --lazy-methods, brace-initialized static array #846

Closed
@reuk

Description

@reuk

Using the current tip of test-gen-support (7cbe566), the following program fails verification when invoked with --lazy-methods and succeeds otherwise. The full command-line is cbmc Main.class (--lazy-methods).

class Problem {
  private static final Object[] DEFAULT = {};
  private Object data;

  Problem() {
    this.data = DEFAULT;
  }

  void checkInvariant() {
    assert data != null;
  }
}

public class Main {
  public static void main(String[] args) {
    new Problem().checkInvariant();
  }
}

@smowton, do you know why this might be?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions