bugGNU troff - Bugs: bug #58447, [me] valid input with specific...

 
 

bug #58447: [me] valid input with specific parameters causes a fatal error

Submitted by:  Dave <barx>
Submitted on:  Tue 26 May 2020 05:39:13 PM UTC  
 
Category:  Macro - me Severity:  3 - Normal
Item Group:  Incorrect behaviour Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 02 Apr 2021 08:08:11 AM UTC, comment #1: 

A variant of this bug (triggered by slightly different limits of some of the parameters*) exists in Heirloom troff's -me macros.  Since Heirloom and groff share no code base, but both projects' -me macro set are forks of Eric Allman's original set, this strongly suggests the bug is in common -me code.

According to the header blocks of the respective files, groff's -me macros are forked from version 2.31 (http://svnweb.freebsd.org/csrg/share/me/tmac.orig_me?revision=34394&view=markup) of Eric Allman's, and Heirloom's from version 2.14 (http://svnweb.freebsd.org/csrg/share/me/tmac.orig_me?revision=5313&view=markup).

* Specifically, tp must be 15 or greater, and $v need not be set at all.  The footnote text must also be extended by a couple more lines.

Dave <barx>
Project Member
Tue 26 May 2020 05:39:13 PM UTC, original submission:  

The attached input file, which uses the -me macro set, results in

stack_limit_bug:41: fatal error: input stack limit exceeded (probable infinite loop)

Groff 1.22.3 fails immediately with this error.  The latest groff code from git eventually fails with this error after emitting a few thousand lines of backtrace messages.

The file itself is linear, with one diversion (in the form of the macro pair ".(f" and ".)f") but no loops, so the error must come from the -me macro set.

groff fails with this error for the default output device (-Tps) and for -Tpdf, but not for -Tascii or other TTY output formats.

I've been unable to make the example any simpler.  Triggering the bug seems to require specific combinations of values in the -me registers tp, tm, and $v, as documented in the comments within the attached file, along with a header defined by the .he macro (its contents don't seem to matter, but it must be present to trigger the bug) and a footnote long enough to span a page break.

Dave <barx>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #49178:  stack_limit_bug added by barx (2KiB - application/octet-stream - sample groff input file to demonstrate the stack limit violation)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Updated the item)
  • -email is unavailable- added by barx (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-06-04 barx Summaryme macros: valid input with specific parameters causes a fatal error => [me] valid input with specific parameters causes a fatal error
    2020-07-25 gbranden CategoryMacro - others => Macro - me
    2020-05-26 barx Attached File- => Added stack_limit_bug, #49178

    Back to the top


    Powered by Savane 3.6