Re: trn's threading
"Eli the Bearded" <[email protected]> Sun, 14 May 2023 23:42:44 -0400 (EDT)
| Newsgroups | gmane.network.trn.general |
|---|---|
| Message-ID | <[email protected]> |
Richard wrote:
> I will switch the code to use the standard OVER command at some point.
> First I need to add an "NNTP conversation" test harness mechanism to
> be able to cover the existing NNTP implementation with tests before
> making changes.
How timely. I've recently encountered a SEGFAULT in the overview code.
I'm looking a comp.mobile.android where a spammer (three of last two
hundred articles locally) is using simply ginormous References headers
and the NNTP server I use has naively merged the folded-over-29-lines
value into one entry of about 2900 bytes, well over the 1000-ish byte
limit you could expect in days of yore.
https://www.rfc-editor.org/rfc/rfc3977#section-3.1
Says "[t]his document does not place any limit on the length of a line
in a multi-line block. However, the standards that define the format of
articles may do so."
https://www.rfc-editor.org/rfc/rfc5536#section-2.2
Says "[c]ompliant software MUST NOT generate (but MAY accept) header
field lines of more than 998 octets. This is the only limit on the
length of a header field line prescribed by this standard."
I think a strict reading of the BNF in 3977 supports that overview
headers fall under that 5536 limit of 998 octets, but splitting the spec
across two RFCs does complicate matters.
These articles are segfaulting for me during killfile operate-on-
References-headers-actions in trn4-p77, the acli trn fork and your trn
fork. Specifically I look for certain domain names in references and
autoselct. What I'm seeing is the long references line smash the stack.
An example backtrace looks like:
#0 0x00007c8bf3d9c061 in strlen () from /usr/lib/libc.so.12
#1 0x0000000000417a3f in dointerp (
dest=0x6acd40 <filename> "@googlegroups.com> <d4f3f15c-9a03-4c5d-a672-b4355778ec38n-/[email protected]> <b223cec9-d71b-423f-821f-ac2e4c192cben-/[email protected]> <f50e0189-5c8b-4883-8b27-877f0cebe475n-/[email protected]> <511c4858-"..., destsize=1, pattern=0x6a23a2 <killglobal+2> "/KILL",
stoppers=0x0, cmd=0x0) at intrp.c:933
#2 0x0000000000453020 in filexp (s=0x6a23a0 <killglobal> "%p/KILL") at util2.c:92
#3 0x0000000000419f58 in open_kfile (local=0) at kfile.c:733
#4 0x0000000000418fc8 in kill_unwanted (starting=102277,
message=0x47d178 "Processing memorized commands...\n\n", entering=1) at kfile.c:367
#5 0x000000000041f9bf in do_newsgroup (
start_command=0x6acca8 <nullstr> "<591f85aa-94b9-4777-a1a5-218cbc18ba9bn-/[email protected]> <dc423095-cb2e-4720-a934-1d53e97a8024n-/[email protected]> <a418f01b-0ba0-4e32-afe5-10f596c64635n-/[email protected]> <d4f3f15c-9a03-4c5d-a672-b435"...) at ng.c:174
#6 0x000000000045021e in input_newsgroup () at trn.c:772
#7 0x000000000044f29d in do_multirc () at trn.c:334
#8 0x000000000044ec19 in main (argc=1, argv=0x7f7fff9a2688) at trn.c:158
Elijah