Skip to content

Engine sets the hidden SecurityManager static field #697

Closed
@sergeypospelov

Description

@sergeypospelov

Description

Engine produces staticsBefore with the hidden SecurityManager static field. The concrete executor can't find this field, so it isn't present in staticsAfter. This leads to test generation failure as we expect staticsBefore and staticsAfter to have the same structure.

To Reproduce

Steps to reproduce the behavior:

  1. Create this method:
    public void createThread() {
        final int[] x = {0};
        new Thread(() -> {
            x[0]++;
        }).start();
        new Thread(() -> {
            x[0]++;
        }).start();
    }
  1. Run test generation via UtBot plugin

Expected behavior

At least one test generated and there are no tests with internal exceptions.

Actual behavior

There is a generated test with an internal exception.

Visual proofs (screenshots, logs, images)

image

Metadata

Metadata

Labels

comp-symbolic-engineIssue is related to the symbolic execution enginectg-bugIssue is a bug

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions