summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2021-04-02 14:20:57 +0000
committerotto <otto@openbsd.org>2021-04-02 14:20:57 +0000
commit8d4875efd4ecd36355f3a5d3cc1dd262105867ac (patch)
tree4d1d968cc18ca65a64a662fabb5ee227ee3f5ee4
parentInclude the default cert.pem file path in tls_load_file error message. (diff)
downloadwireguard-openbsd-8d4875efd4ecd36355f3a5d3cc1dd262105867ac.tar.xz
wireguard-openbsd-8d4875efd4ecd36355f3a5d3cc1dd262105867ac.zip
Two cases of BRE involving counts and backrefs that go wrong and
similar that have no isssues. Reported by Michael Paoli. Failing cases commented out for now.
-rw-r--r--regress/lib/libc/regex/tests17
1 files changed, 16 insertions, 1 deletions
diff --git a/regress/lib/libc/regex/tests b/regress/lib/libc/regex/tests
index f400b8575b7..f3fd9d0e6b7 100644
--- a/regress/lib/libc/regex/tests
+++ b/regress/lib/libc/regex/tests
@@ -1,4 +1,4 @@
-# $OpenBSD: tests,v 1.9 2020/12/28 21:41:55 millert Exp $
+# $OpenBSD: tests,v 1.10 2021/04/02 14:20:57 otto Exp $
# $NetBSD: tests,v 1.5 1995/04/20 22:40:00 cgd Exp $
# regular expression test set
@@ -595,3 +595,18 @@ a?b - ab ab
# FreeBSD PR 130504
(.|())(b) - ab ab
(()|.)(b) - ab ab
+
+# Some BRE cases where \{0,\} makes a backref go wrong, as reported by Michael Paoli
+Y*\(x\)\1 b YYxx YYxx
+Y\{2,\}\(x\)\1 b YYxx YYxx
+# Fails currently
+#Y\{0,\}\(x\)\1 b YYxx YYxx
+Y\{0,\}\(x\) b YYxx YYx
+Y\{2,\}x\{1,\} b YYxx YYxx
+Y\{2,\}x\{0,\}z b YYxxz YYxxz
+Y\{0,\}x\{0,\}z b YYxxz YYxxz
+Y\{2,\}\(xy\)\1 b YYxyxy YYxyxy
+# Fails currently
+#Y\{0,\}\(xy\)\1 b YYxyxy YYxyxy
+Y*\(xy\)\1 b YYxyxy YYxyxy
+Y\{0,\}\(xy\)xy b YYxyxy YYxyxy