[bug #65930] [me] large values of register `tv` cause infinite trap recursion

2024-07-03 Thread G. Branden Robinson
Follow-up Comment #9, bug #65930 (group groff):


$ groff -me tv-stack-limit.me | wc
249 7056268
$ groff -Tascii -me tv-stack-limit.me | uniq -c


These aren't exercising the formatter in the same way; they're using different
output drivers (unless you have GROFF_TYPESETTER=ascii in your environment)
with different vertical resolutions.

When using a `$v` of 421, I tested with the implicit 'ps' output device in
every case and did reproduce the infinite recursion.


___

Reply to this item at:

  

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


signature.asc
Description: PGP signature


[bug #65930] [me] large values of register `tv` cause infinite trap recursion

2024-07-03 Thread G. Branden Robinson
Follow-up Comment #8, bug #65930 (group groff):

Hrm, I definitely can reproduce it, with a `$v` of 421, using _groff_ 1.22.4.


$ /usr/bin/groff --version | head -n 1
GNU groff version 1.22.4
$ cat ./EXPERIMENTS/bug-65930b.me
.\"mso e.tmac
.br
.nr $v 421
.fo 'foo'bar'baz'
.lp
You get the diplomatic treatment
.br
You get the force-fed future
.br
You get the funk after death
.br
You get the weisenheimer brainstorm
$ /usr/bin/groff -z -me ./EXPERIMENTS/bug-65930b.me
troff: fatal error: input stack limit exceeded (probable infinite loop)


I thought briefly that the `-me` versus `mso` approaches of loading the
package mattered, but they don't.


$ cat ./EXPERIMENTS/bug-65930c.me 
.mso e.tmac
.br
.nr $v 421
.fo 'foo'bar'baz'
.lp
You get the diplomatic treatment
.br
You get the force-fed future
.br
You get the funk after death
.br
You get the weisenheimer brainstorm
$ /usr/bin/groff -z ./EXPERIMENTS/bug-65930c.me
troff: fatal error: input stack limit exceeded (probable infinite loop)


I can reproduce it with groff 1.23.0 and groff Git HEAD (my working copy,
which doesn't have the patch applied) as well.

And if I go back to your original reproducer in comment #0, I can reproduce
your problem with all the same versions of _groff_.

Can you reconfirm reproducibility of your original, then test each of my two
variants?  Please test with 1.22.4, then 1.23.0, then HEAD.





___

Reply to this item at:

  

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


signature.asc
Description: PGP signature


[bug #65930] [me] large values of register `tv` cause infinite trap recursion

2024-07-03 Thread Dave
Follow-up Comment #7, bug #65930 (group groff):

OK.  So.

The patch has no effect on my original test file.  Test fails with it, fails
without it.

Your updated test file (from comment #2) does not generate the error under any
circumstances for me.  Not with patched -me, not with unpatched, not with a
stock 1.22.4.

$ cat tv-stack-limit.me
.nr $v 1640u
.fo 'foo'bar'baz'
.lp
You get the diplomatic treatment
.br
You get the force-fed future
.br
You get the funk after death
.br
You get the weisenheimer brainstorm
$ groff --version | head -1
GNU groff version 1.22.4
$ groff -me tv-stack-limit.me | wc
249 7056268
$ groff -Tascii -me tv-stack-limit.me | uniq -c
 20 
  1 You get the diplomatic treatment
 13 
  1 You get the force-fed future
 13 
  1 You get the funk after death
 13 
  1 foo  bar baz
 23 
  1 You get the weisenheimer brainstorm
 41 
  1 foo  bar baz
  3 




___

Reply to this item at:

  

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


signature.asc
Description: PGP signature


[bug #65930] [me] large values of register `tv` cause infinite trap recursion

2024-07-03 Thread G. Branden Robinson
Follow-up Comment #6, bug #65930 (group groff):


[comment #5 comment #5:]

> First speed bump: patch fails to apply.  This turns out to be because the
tab characters in the patch have been reduced to strings of spaces.
> ... I now suspect there was a copy or paste translation error when pasting
the patch into comment #2.

Urp, sorry--yes, I very likely did that instead of considerately attaching a
patch _file_.


___

Reply to this item at:

  

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


signature.asc
Description: PGP signature


[bug #65930] [me] large values of register `tv` cause infinite trap recursion

2024-07-03 Thread Dave
Follow-up Comment #5, bug #65930 (group groff):

[comment #2 comment #2:]
> Try this patch:

First speed bump: patch fails to apply.  This turns out to be because the tab
characters in the patch have been reduced to strings of spaces.

I initially suspected being bitten by
http://savannah.nongnu.org/support/?110582, but the workaround mentioned in
that ticket still did not give me my tabs, so I now suspect there was a copy
or paste translation error when pasting the patch into comment #2.

But I was able to fix the patch manually and get it to apply, so this speed
bump was minor.  For posterity I'm attaching my patched patch here.

Now to actually run the patched -me code and see what happens!

(file #56226)

___

Additional Item Attachment:

File name: me.65930.patch Size: 656B



AGPL NOTICE

These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://git.savannah.nongnu.org/cgit/administration/savane.git/snapshot/savane-05dcad1214d86f0cdb09953df600b098f3426851.tar.gz


___

Reply to this item at:

  

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


signature.asc
Description: PGP signature