Skip to content

Commit bdf4809

Browse files
committed
trying to debug issue with familie
1 parent 39d2fcb commit bdf4809

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

core/src/main/kotlin/org/evomaster/core/search/gene/string/StringGene.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,9 +822,10 @@ class StringGene(
822822
try {
823823
toAddGenes.add(RegexHandler.createGeneForJVM(regex))
824824
log.trace("Regex, added specification for: {}", regex)
825-
826825
} catch (e: Exception) {
827826
LoggingUtil.uniqueWarn(log, "Failed to handle regex: $regex")
827+
} catch (e: java.lang.StackOverflowError){
828+
LoggingUtil.uniqueWarn(log, "Failed to handle regex, as it gives a stack overflow error: $regex")
828829
}
829830
}
830831

core/src/test/kotlin/org/evomaster/core/parser/RegexHandlerTest.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,20 @@ import org.evomaster.core.search.service.AdaptiveParameterControl
88
import org.evomaster.core.search.service.Randomness
99
import org.evomaster.core.search.service.mutator.MutationWeightControl
1010
import org.junit.jupiter.api.Assertions.*
11+
import org.junit.jupiter.api.Disabled
1112
import org.junit.jupiter.api.Test
1213
import org.junit.jupiter.api.assertThrows
1314
import java.util.regex.Pattern
1415

1516
internal class RegexHandlerTest{
1617

18+
@Disabled("Needs to hande lookahead in regex")
19+
@Test
20+
fun testFamilieBaSakIssue(){
21+
val s = "^((?iu)@.+)$"
22+
RegexHandler.createGeneForJVM(s)
23+
}
24+
1725

1826
@Test
1927
fun testCwaIssue(){

0 commit comments

Comments
 (0)