This repository has been archived by the owner on Oct 3, 2021. It is now read-only.
StringBuilderConstructors01 exposes in fact a violation_witness due to overflow when following Java Spec #1103
Labels
Java
Task in language Java
Creation of a StringBuilder with an input string of size
Integer.MAX_INT-15
will cause anNegativeArraySizeException
during construction:sv-benchmarks/java/jbmc-regression/StringBuilderConstructors01/Main.java
Lines 13 to 19 in f86649d
Looking into the library the constructors are defined as follows:
The term of
str.length() + 16
is not some implementation specific detail, but is defined in the Java documentation:https://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html#StringBuilder-java.lang.String-
The text was updated successfully, but these errors were encountered: