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

                 Summary: [eqn] `set` primitive should diganose out-of-range
parameter values
                   Group: GNU roff
               Submitter: gbranden
               Submitted: Sat 19 Sep 2026 01:28:50 PM UTC
                Category: Preprocessor eqn
                Severity: 1 - Wish
              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: Sat 19 Sep 2026 01:28:50 PM UTC By: G. Branden Robinson <gbranden>
In the following, we see GNU _eqn_ handling crazily invalid parameter values
just as quietly as reasonable ones.


$ printf '.EQ\nset over_hang 10\n.EN\n' | eqn 2>&1 >/dev/null | grep . || echo
NO DIAGNOSTICS
NO DIAGNOSTICS
$ printf '.EQ\nset over_hang -123456789012345678901234567890\n.EN\n' |
ASAN_OPTIONS=detect_leaks=0 ./build/eqn 2>&1 >/dev/null | grep . || echo NO
DIAGNOSTICS
NO DIAGNOSTICS
$ printf '.EQ\nset over_hang -123456789012345678901234567890\n.EN\n' |
ASAN_OPTIONS=detect_leaks=0 ./build/eqn
.do if !dEQ .ds EQ
.do if !dEN .ds EN
.if !'\*(.T'ps' .if !'\*(.T'html' .tm \n[.F]: warning: ./build/eqn should have
been given a '-T\*(.T' option
.if '\*(.T'html' .if !'ps'ps' .tmc \n[.F]: warning: ./build/eqn should have
been given a '-Tps' option
.if '\*(.T'html' .if !'ps'ps' .tm1 " (consider invoking 'groff -Thtml -e')
.lf 1 "/home/branden/groff-HEAD/share/groff/1.25.0/tmac/eqnrc
.\" startup file for eqn
.\"
.EQ
.nr 0C \n(.C
.cp 0
.ds 10
.cp \n(0C
.lf 4
.EN
.lf 1 "-
.EQ
.nr 0C \n(.C
.cp 0
.ds 10
.cp \n(0C
.lf 2
.EN


The invalid input appears to be ignored (double-check that).  We should issue
a warning diagnostic.







    _______________________________________________________

Reply to this item at:

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

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

Attachment: signature.asc
Description: PGP signature

Reply via email to