Bug 266868 - mandoc(1) hangs in endless loop and eats all CPU time
Summary: mandoc(1) hangs in endless loop and eats all CPU time
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Wolfram Schneider
URL:
Keywords:
Depends on:
Blocks: 274423
  Show dependency treegraph
 
Reported: 2022-10-06 16:09 UTC by Wolfram Schneider
Modified: 2024-02-19 06:55 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfram Schneider freebsd_committer freebsd_triage 2022-10-06 16:09:50 UTC
mandoc on FreeBSD 14-current cannot render the japanese groff_ms manual page. It runs in an endless loop, eats all CPU time and never terminates.

How to repeat:

curl -sSf https://people.freebsd.org/~wosch/tmp/mandoc/endless-loop/groff_ms.7 | mandoc
Comment 1 commit-hook freebsd_committer freebsd_triage 2022-12-27 17:16:47 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=433c5a8ae42f0487cfe860af1d291ec3c7d009f7

commit 433c5a8ae42f0487cfe860af1d291ec3c7d009f7
Author:     Wolfram Schneider <wosch@FreeBSD.org>
AuthorDate: 2022-12-27 17:04:04 +0000
Commit:     Wolfram Schneider <wosch@FreeBSD.org>
CommitDate: 2022-12-27 17:04:04 +0000

    do not expect mandoc(1) to terminate in finite time

    PR:             266868

 usr.bin/man/man.sh | 6 ++++++
 1 file changed, 6 insertions(+)
Comment 2 Baptiste Daroussin freebsd_committer freebsd_triage 2023-10-13 06:55:27 UTC
have you reported this upstream?
Comment 3 Baptiste Daroussin freebsd_committer freebsd_triage 2023-10-13 07:02:05 UTC
tested and still valid with latest version of mandoc
Comment 4 Baptiste Daroussin freebsd_committer freebsd_triage 2023-10-13 07:03:51 UTC
oups human mistake, this has been fixed in cvs versin of mandoc! I will try to import it ASAP
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-02-12 15:24:42 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=147ab264373a61eea9f6bd9ffd06b399a186f7ef

commit 147ab264373a61eea9f6bd9ffd06b399a186f7ef
Author:     Wolfram Schneider <wosch@FreeBSD.org>
AuthorDate: 2022-12-27 17:04:04 +0000
Commit:     Wolfram Schneider <wosch@FreeBSD.org>
CommitDate: 2024-02-12 15:22:55 +0000

    do not expect mandoc(1) to terminate in finite time

    PR:             266868
    (cherry picked from commit 433c5a8ae42f0487cfe860af1d291ec3c7d009f7)

 usr.bin/man/man.sh | 6 ++++++
 1 file changed, 6 insertions(+)
Comment 6 Mark Linimon freebsd_committer freebsd_triage 2024-02-19 06:55:09 UTC
^Triage: assign to committer who also MFCed.