From fb097805fe26dca7c3ad431588133bb1968c69be Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 22 Oct 2023 16:57:24 +0000 Subject: new regression test for roff.c rev. 1.270: infinite recursion in macro argument expansion --- regress/roff/args/Makefile | 7 ++++--- regress/roff/args/infrec.in | 10 ++++++++++ regress/roff/args/infrec.out_ascii | 9 +++++++++ regress/roff/args/infrec.out_lint | 1 + 4 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 regress/roff/args/infrec.in create mode 100644 regress/roff/args/infrec.out_ascii create mode 100644 regress/roff/args/infrec.out_lint (limited to 'regress/roff/args') diff --git a/regress/roff/args/Makefile b/regress/roff/args/Makefile index c1f0901e..49aa653b 100644 --- a/regress/roff/args/Makefile +++ b/regress/roff/args/Makefile @@ -1,6 +1,7 @@ -# $OpenBSD: Makefile,v 1.5 2023/10/21 17:28:01 schwarze Exp $ +# $OpenBSD: Makefile,v 1.6 2023/10/22 16:54:19 schwarze Exp $ -REGRESS_TARGETS = roff man mdoc esc -LINT_TARGETS = roff man mdoc +REGRESS_TARGETS = roff man mdoc esc infrec +LINT_TARGETS = roff man mdoc infrec +SKIP_GROFF = infrec .include diff --git a/regress/roff/args/infrec.in b/regress/roff/args/infrec.in new file mode 100644 index 00000000..5935404f --- /dev/null +++ b/regress/roff/args/infrec.in @@ -0,0 +1,10 @@ +.\" $OpenBSD: infrec.in,v 1.1 2023/10/22 16:54:19 schwarze Exp $ +.TH ARGS-INFREC 1 "October 22, 2023" +.SH NAME +args-infrec - infinite recursion in macro argument expansion +.SH DESCRIPTION +.ds mys first word +.ds mys \\*[mys] another word +initial text +.RB prefix \\*[mys] postfix +final text diff --git a/regress/roff/args/infrec.out_ascii b/regress/roff/args/infrec.out_ascii new file mode 100644 index 00000000..e619c08b --- /dev/null +++ b/regress/roff/args/infrec.out_ascii @@ -0,0 +1,9 @@ +ARGS-INFREC(1) General Commands Manual ARGS-INFREC(1) + +NNAAMMEE + args-infrec - infinite recursion in macro argument expansion + +DDEESSCCRRIIPPTTIIOONN + initial text prefixpostfix final text + +OpenBSD October 22, 2023 ARGS-INFREC(1) diff --git a/regress/roff/args/infrec.out_lint b/regress/roff/args/infrec.out_lint new file mode 100644 index 00000000..1de6423c --- /dev/null +++ b/regress/roff/args/infrec.out_lint @@ -0,0 +1 @@ +mandoc: infrec.in:9:1: ERROR: input stack limit exceeded, infinite loop? -- cgit