Skip to content

Engine sets the hidden SecurityManager static field #697

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

Closed
sergeypospelov opened this issue Aug 10, 2022 · 0 comments · Fixed by #699
Closed

Engine sets the hidden SecurityManager static field #697

sergeypospelov opened this issue Aug 10, 2022 · 0 comments · Fixed by #699
Assignees
Labels
comp-symbolic-engine Issue is related to the symbolic execution engine ctg-bug Issue is a bug

Comments

@sergeypospelov
Copy link
Member

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

@sergeypospelov sergeypospelov added ctg-bug Issue is a bug comp-symbolic-engine Issue is related to the symbolic execution engine labels Aug 10, 2022
@sergeypospelov sergeypospelov self-assigned this Aug 10, 2022
@sergeypospelov sergeypospelov moved this to Todo in UTBot Java Aug 10, 2022
Repository owner moved this from Todo to Done in UTBot Java Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-symbolic-engine Issue is related to the symbolic execution engine ctg-bug Issue is a bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant