[Bug 288027] mandoc crashes with: SYSERR: write: Illegal byte sequence

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 05 Jul 2025 15:10:03 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288027

            Bug ID: 288027
           Summary: mandoc crashes with: SYSERR: write: Illegal byte
                    sequence
           Product: Base System
           Version: 15.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: wosch@FreeBSD.org

With the latest imported mandoc version 1.14.6s20250613
mandoc fails on some ports manual pages on FreeBSD-15-current

$ sudo pkg install freeipa-client-4.12.2
$ /usr/bin/mandoc /usr/local/share/man/man1/ipa.1.gz >/dev/null
mandoc: /usr/local/share/man/man1/ipa.1.gz: SYSERR: write: Illegal byte
sequence
mandoc: see above the output for SYSERR messages
echo $?
6

man mandoc
EXIT STATUS
     6       An operating system error occurred, for example exhaustion of
             memory, file descriptors, or process table entries.  Such errors
             may cause mandoc to exit at once, possibly in the middle of
             parsing or formatting a file.

My VM has 16GB RAM.

This problem does not exists on stable/14 or stable/13

curl -sSf https://people.freebsd.org/~wosch/tmp/mandoc/ipa.1 | env LANG=C.UTF-8
/usr/bin/mandoc >/dev/null; echo $?
0

-- 
You are receiving this mail because:
You are the assignee for the bug.