bugGNU roff - Bugs: bug #61034, [me] should reject insufficient...

 
 

bug #61034: [me] should reject insufficient page lengths

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Thu 12 Aug 2021 08:44:58 PM UTC
   
 
Category:  Macro me Severity:  3 - Normal
Item Group:  Incorrect behaviour Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.23.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 06 Mar 2022 11:17:49 PM UTC, comment #3: 

Discussion about the updated fix took place in bug #61428.

Dave <barx>
Group Member
Sat 05 Feb 2022 05:59:07 PM UTC, comment #2: 

Fix updated.


commit f6fcbba95cc77dedcae75e61db26e86922f8f8ba
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Wed Feb 2 04:06:40 2022 +1100

    [me]: Add page length insufficiency check.

    * tmac/e.tmac (@h): Port Keith Marshall's page length checker from
      ms(7).

    Fixes <https://savannah.gnu.org/bugs/?61034>.


G. Branden Robinson <gbranden>
Group administrator
Fri 13 Aug 2021 02:06:44 PM UTC, comment #1: 


commit 7bfaf799c4822a99762cc30b0cf16ee89449621c
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Aug 13 08:15:31 2021 +1000

    [me]: Abort if paper length too short.

    * tmac/e.tmac: Validate page length to prevent too-short paper formats
      from causing traps to call each other until the input stack overflows.
      The minimum is 14v.

      (check_page_length): Define new macro to perform the check.

      (bp, @p, sh, 2c, 1c): Call it from likely candidates (@p is internal
      and called by paragraphing macros).

      (pl): Intercept and wrap the `pl` request itself; check its setting
      immediately.

    Fixes <https://savannah.gnu.org/bugs/?61034>.


G. Branden Robinson <gbranden>
Group administrator
Thu 12 Aug 2021 08:44:58 PM UTC, original submission:  

me(7) behaves pretty horribly if you give it a page length of less than 14v.

Input:

.pl 13v
Sed ut perspiciatis, unde omnis iste natus error sit voluptatem
accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab
illo inventore veritatis et quasi architecto beatae vitae dicta sunt,
explicabo.  Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur
aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione
voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum,
quia dolor sit amet consectetur adipiscivelit, sed quia non-numquam eius
modi tempora incidunt, ut labore et dolore magnam aliquam quaerat
voluptatem.  Ut enim ad minima veniam, quis nostrum exercitationem ullam
corporis suscipitlaboriosam, nisi ut aliquid ex ea commodi consequatur?
Quis autem vel eum iure reprehenderit, qui inea voluptate velit esse,
quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo
voluptas nulla pariatur?  At vero eos et accusamus et iusto odio
dignissimos ducimus, qui blanditiis praesentium voluptatum deleniti
atque corrupti, quos dolores et quas molestias excepturi sint, obcaecati
cupiditate non-provident, similique sunt in culpa, qui officia deserunt
mollitia animi, id est laborum et dolorum fuga.  Et harum quidem rerum
facilis est et expedita distinctio.  Nam libero tempore, cum soluta
nobis est eligendi optio, cumque nihil impedit, quo minus id, quod
maxime placeat, facere possimus, omnis voluptas assumenda est, omnis
dolor repellendus.  Temporibus autem quibusdam et aut officiis debitis
aut rerum necessitatibus saepe eveniet, ut et voluptates repudiandae
sint et molestiae non-recusandae.  Itaque earum rerum hic tenetur a
sapiente delectus, ut aut reiciendis voluptatibus maiores alias
consequatur aut perferendis doloribus asperiores repellat.


Run "nroff -me" on the above.  The death spiral ends like this.


troff: backtrace: '/home/branden/src/GIT/groff/build/../tmac/e.tmac':498: macro 'bp'
troff: backtrace: '/home/branden/src/GIT/groff/build/../tmac/e.tmac':433: macro '@e'
troff: backtrace: '/home/branden/src/GIT/groff/build/../tmac/e.tmac':383: trap-called macro '@f'
troff: backtrace: '/home/branden/src/GIT/groff/build/../tmac/e.tmac':288: trap-called macro '@h'
troff: backtrace: file 'EXPERIMENTS/lorem_ipsum.me':8
troff: EXPERIMENTS/lorem_ipsum.me:8: fatal error: input stack limit exceeded (probable infinite loop)


I propose to fix this by having me(7) test the page length and refuse to format if it's too short.

G. Branden Robinson <gbranden>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-02-06 barx Carbon-Copy- Added barx
    2021-08-13 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.23.0

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code