Skip to content

Commit 8eac786

Browse files
committed
trying to avoid crash in QuantifierRxGene
1 parent bdf4809 commit 8eac786

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

core/src/main/kotlin/org/evomaster/core/search/gene/regex/QuantifierRxGene.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,9 @@ class QuantifierRxGene(
200200
}
201201

202202
for (i in 0 until other.atoms.size) {
203-
if (!this.atoms[i].containsSameValueAs(other.atoms[i])) {
203+
val x = this.atoms[i]
204+
val y = other.atoms[i]
205+
if (!x.possiblySame(y) || !x.containsSameValueAs(y)) {
204206
return false
205207
}
206208
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ internal class RegexHandlerTest{
1717

1818
@Disabled("Needs to hande lookahead in regex")
1919
@Test
20-
fun testFamilieBaSakIssue(){
20+
fun testLanguageTool(){
2121
val s = "^((?iu)@.+)$"
2222
RegexHandler.createGeneForJVM(s)
2323
}

0 commit comments

Comments
 (0)