Skip to content

Test generation is cancelled due to JVM crash when overflow detection is on #2022

Closed
@Markoutte

Description

@Markoutte

Description

When option "Treat overflow as errors" is on than in some cases test generation is aborted due to JVM crash.

Bad code (will crash):

void test(byte data )
{
    byte result = (byte)(data + 1);
    System.out.println(result);
}

Good code (does not crash):

void wonderwuffle(int data )
{
    int result = (int) (data + 1L);
    System.out.println(result);
}

To Reproduce

Steps to reproduce the behavior:

  1. Enable option "Treat overflow as errors"
  2. Enable only symbolic execution test generation
  3. Use code above
  4. Try to generate test

Expected behavior

Some tests are generated.

Actual behavior

Test generation is cancelled due to JVM crash and hs_err_pid*.log file is generated.

Environment

No special environment.

Additional context

Looks like that problem in method TraverserKt.intOverflowCheck.

Metadata

Metadata

Assignees

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