Skip to content

Commit

Permalink
feat: add z3str3 soundness issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nicdard committed Jul 15, 2022
1 parent 1c3c16e commit 5bb348b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions bugs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
| [QF_NRA 1](z3/qf_nra-1.smt2) | QF_NRA | Segfault | [#6044](https://github.com/Z3Prover/z3/issues/6044) | 20/05/22 |
| [QF_S 1](z3/qf_s-1.smt2) | QF_S | Memory Leak | [#6076](https://github.com/Z3Prover/z3/issues/6076) | 04/06/22 |
| [QF_BV 1](z3/qf_bv-1.smt2) | QF_BV | Assertion Violation | [#6143](https://github.com/Z3Prover/z3/issues/6143) | 07/07/22 |
| [QF_S 2](z3/qf_s-2.smt2) | QF_S | Soundness | [#6159](https://github.com/Z3Prover/z3/issues/6159) | 14/07/22 |

19 changes: 19 additions & 0 deletions bugs/z3/qf_s-2.smt2
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
(declare-fun s () String)
(declare-fun r () String)
(assert
(and
(=
"\u{2f}" (str.substr s 0 (str.len "lo")))
(str.in_re r (re.++ (re.* re.allchar) (re.++ (str.to_re "\u{2f}\") (re.* re.allchar)))
)
(=
(str.substr r 0 (str.len (str.++ r ""))) (str.++ (str.++ (str.substr s 0 (str.len "lo")) s)
(str.substr s 0 1))
)
)
)
(check-sat)
; $ z3
; sat, expected unsat

0 comments on commit 5bb348b

Please sign in to comment.