URL:
  <https://savannah.gnu.org/bugs/?68252>

                 Summary: [troff] assertion failure in
`token::is_usable_as_delimiter()` when formatting ca. 1982 man page
                   Group: GNU roff
               Submitter: gbranden
               Submitted: Fri 17 Apr 2026 08:15:32 PM UTC
                Category: Core
                Severity: 4 - Important
              Item Group: Crash/Unresponsive
                  Status: Confirmed
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Unlocked
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Fri 17 Apr 2026 08:15:32 PM UTC By: G. Branden Robinson <gbranden>
Clem Cole found another problem when using 2026 _groff_ to render 1982
documents.

Not sure of the legal status of the document, so I won't share it here, but no
doubt I'll be coming up with a reproducer.

Reproduces with Git HEAD, 1.24.1, and 1.24.0.  Not present in 1.23.0--not a
surprise since I know I added this assertion as part of the Great Delimiter
Revamp.  See bug #66009, bug #67375, bug #67842, and possibly others.

Anyway, that makes it a regression, so setting Severity to Important.


$ ./build/test-groff -C -Tpdf -t -mandoc -z SPECIMENS/clem-man-page/750ops.8
troff: ../src/roff/troff/input.cpp:2946: bool
token::is_usable_as_delimiter(bool, delimiter_context): Assertion `context !=
DELIMITER_GROFF_EXPRESSION' failed.
/home/branden/src/GIT/groff/build/groff: error: troff: Aborted (core dumped)
$ gdb ./build/troff ./core
GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./build/troff...
[New LWP 19456]
Core was generated by `troff -C -mandoc -z -Tpdf'.
Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
##(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007fc0b53ff537 in __GI_abort () at abort.c:79
#2  0x00007fc0b53ff40f in __assert_fail_base (fmt=0x7fc0b5576688 "%s%s%s:%u:
%s%sAssertion `%s' failed.\n%n", 
    assertion=0x5630173e6958 "context != DELIMITER_GROFF_EXPRESSION",
file=0x5630173e9e72 "../src/roff/troff/input.cpp", line=2946, 
    function=<optimized out>) at assert.c:94
#3  0x00007fc0b540e6e2 in __GI___assert_fail
(assertion=assertion@entry=0x5630173e6958 "context !=
DELIMITER_GROFF_EXPRESSION", 
    file=file@entry=0x5630173e9e72 "../src/roff/troff/input.cpp",
line=line@entry=2946, 
    function=function@entry=0x5630173e6918 "bool
token::is_usable_as_delimiter(bool, delimiter_context)") at assert.c:103
#4  0x00005630173a6bfd in token::is_usable_as_delimiter (this=<optimized out>,
report_error=report_error@entry=false, 
    context=context@entry=DELIMITER_GROFF_EXPRESSION) at
../src/roff/troff/input.cpp:2946
#5  0x00005630173cef85 in read_font_identifier
(finfo=finfo@entry=0x7ffc78b95a50) at ../src/roff/troff/node.cpp:7009
#6  0x00005630173cf2af in embolden_font_request () at
../src/roff/troff/node.cpp:7353
#7  0x00005630173b3a88 in interpolate_macro_or_invoke_request (nm=...,
do_not_want_next_token=<optimized out>) at ../src/roff/troff/input.cpp:4712
#8  0x00005630173b8cf0 in process_input_stack () at
../src/roff/troff/input.cpp:3602
#9  0x0000563017389188 in main (argc=5, argv=0x7ffc78b95d78) at
../src/roff/troff/input.cpp:10232
##(gdb) quit


That trace is interesting.  Unless I'm forgetting something, the language
doesn't _have_ a delimited escape sequence for font selection.  (Syntax like
`\f(CR` and `\f[MARIGOLD]` is not "delimited" in the lexicon I've adopted for
_groff_ documentation.  `\C'em'`, which can also be spelled `\C@em@` among
many other variations, is.)







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68252>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to