File tree Expand file tree Collapse file tree
main/kotlin/org/evomaster/core/search/gene/string
test/kotlin/org/evomaster/core/parser Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -8,12 +8,20 @@ import org.evomaster.core.search.service.AdaptiveParameterControl
88import org.evomaster.core.search.service.Randomness
99import org.evomaster.core.search.service.mutator.MutationWeightControl
1010import org.junit.jupiter.api.Assertions.*
11+ import org.junit.jupiter.api.Disabled
1112import org.junit.jupiter.api.Test
1213import org.junit.jupiter.api.assertThrows
1314import java.util.regex.Pattern
1415
1516internal 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 (){
You can’t perform that action at this time.
0 commit comments