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

                 Summary: groff_mdoc.7: runtime error in "input.cpp" compiled
with clang-21
                   Group: GNU roff
               Submitter: bjarniig
               Submitted: Mon 11 May 2026 08:08:55 PM UTC
                Category: Core
                Severity: 3 - Normal
              Item Group: Warning/Suspicious behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Unlocked
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Mon 11 May 2026 08:08:55 PM UTC By: Bjarni Ingi Gislason <bjarniig>
Subject: groff_mdoc.7: runtime error in "input.cpp" compiled with clang-21

cd git/groff/build

./test-groff -mandoc -t -ww -z tmac/groff_mdoc.7

../src/roff/troff/input.cpp:4006:22: runtime error: index 167 out of bounds
for type 'unsigned char[128]'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
../src/roff/troff/input.cpp:4006:22

-.-

  No runtime error with "nroff".

-.-

configure:

GNU roff version 1.24.1.718-1a59f-modified configuration summary
----------------------------------------------------------------------
 installation directory prefix    : /usr/local
 C++ compiler and options         : /usr/bin/clang++-21 -Wabi -Walloca -Wall
-Wextra -Wformat=2 -Wattribute-warning -Wcomma -Wdate-time
-Wdeprecated-declarations -Wformat-nonliteral -Wformat-security
-Wfree-nonheap-object -Wimplicit-fallthrough -Winconsistent-dllimport
-Wno-format -Wno-format-nonliteral -Wredundant-decls -Wshadow-all
-Wshift-overflow -Wsign-compare -Wsign-conversion -Wstring-plus-int
-Wthread-safety -Wuninitialized -Wunused -Wunused-macros -Wundef
-Wunused-function -Wunused-parameter -Wvla -fno-omit-frame-pointer
-fsanitize=undefined -fstack-protector-strong -fno-common
-fstack-clash-protection -ftrapv -funsigned-char -fno-builtin
-Wmismatched-new-delete -Wredundant-decls -Wdelete-incomplete -O2 -g
-std=gnu++23  -D_FORTIFY_SOURCE=2 -DGNULIB_NO_VLA 
 C compiler and options           : /usr/bin/clang-21 -Wabi -Walloca -Wall
-Wextra -Wformat=2 -Wattribute-warning -Wcomma -Wdate-time
-Wdeprecated-declarations -Wformat-nonliteral -Wformat-security
-Wfree-nonheap-object -Wimplicit-fallthrough -Winconsistent-dllimport
-Wno-format -Wno-format-nonliteral -Wredundant-decls -Wshadow-all
-Wshift-overflow -Wsign-compare -Wsign-conversion -Wstring-plus-int
-Wthread-safety -Wuninitialized -Wunused -Wunused-macros -Wundef
-Wunused-function -Wunused-parameter -Wvla -fno-omit-frame-pointer
-fstack-protector-strong -fno-common -fstack-clash-protection -ftrapv
-funsigned-char -fno-builtin  -Wold-style-definition
-Wout-of-line-declaration  -O2 -g -std=gnu23  -D_FORTIFY_SOURCE=2
-DGNULIB_NO_VLA 
 Perl interpreter version         : 5.40.1
 Ghostscript command              : gs
 URW fonts directory              : /usr/share/fonts/type1/urw-base35/
 gropdf service level             : full
 X11 support                      : enabled
 X11 app defaults directory       : /usr/local/lib/X11/app-defaults
 default paper format             : A4
 'groff -l' uses print spooler    : no
 preconv can use uchardet library : yes
 can build groff.{info,html,txt}  : yes
 can build groff.{dvi,pdf}        : yes
----------------------------------------------------------------------
configure: Default X11 application defaults directory assumed.









    _______________________________________________________

Reply to this item at:

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

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

Attachment: signature.asc
Description: PGP signature

Reply via email to