[tex-live] [olaf@infovore.xs4all.nl: Re: BUG in patgen (still present in texlive2003 rc iso)]

Karl Berry karl at freefriends.org
Mon Sep 15 17:35:13 CEST 2003


Fabrice, here's a tested patch for patgen (and url to test case).
Thanks, Olaf.

I don't know how far system rebuilds have proceeded.  We (i.e., you :)
might as well check in the patch for any systems which haven't been
started yet, but if any are close to completing, I wouldn't worry about
rebuilding yet again.

Thanks,
k


Date: Mon, 15 Sep 2003 22:19:24 +0200
From: Olaf Weber <olaf at infovore.xs4all.nl>
To: Petr Sojka <sojka at informatics.muni.cz>
Cc: Thomas Esser <te at informatik.uni-hannover.de>, Karl Berry <karl at cs.umb.edu>
Subject: Re: BUG in patgen (still present in texlive2003 rc iso)

Petr Sojka writes:

> I've tried the patch below, but seems it still is not the fix.
> I've put a test case in www.fi.muni.cz/~sojka/patgenbug.tar.bz2
> (there is big wordlist, so it is almost 2.5MB!).
> The patgen command in ./doit produces the whole run
> under solaris with my old binary (included, made from lost sources),
> but patched patgen from tl2003 even with your patch
> produces much shorter log (included), as it ends prematurely
> without any warning.

It does produce a warning, but on standard error instead of standard
output: "PATGEN capacity exceeded, sorry [26000 count trie nodes]."
The following allows the run to complete.

Index: patgen.ch
===================================================================
RCS file: /usr/local/cvsroot/texk/texk/web2c/patgen.ch,v
retrieving revision 1.5
diff -u -r1.5 patgen.ch
--- patgen.ch   24 Oct 2001 16:12:49 -0000      1.5
+++ patgen.ch   15 Sep 2003 19:28:59 -0000
@@ -62,17 +62,28 @@
 @z

 @x Increase constants.
+@!trie_size=55000; {space for pattern trie}
+@!triec_size=26000; {space for pattern count trie, must be less than
+ |trie_size| and greater than the number of occurrences of any pattern in
+ the dictionary}
+ at y
+@!trie_size=550000; {space for pattern trie}
+@!triec_size=260000; {space for pattern count trie, must be less than
+ |trie_size| and greater than the number of occurrences of any pattern in
+ the dictionary}
+ at z
+ at x
 @!max_buf_len=80; {maximum length of input lines, must be at least |max_len|}
 @y
 @!max_buf_len=3000; {maximum length of input lines, must be at least |max_len|}
 @z

- at x Remove file close
+ at x Close both input and output files.
 @d close_out(#)==close(#) {close an output file}
 @d close_in(#)==do_nothing {close an input file}
 @y
- at d close_out(#)== {close an output file}
- at d close_in(#)== {close an input file}
+ at d close_out(#)==xfclose(#, 'inputfile') {close an output file}
+ at d close_in(#)==xfclose(#, 'outputfile') {close an input file}
 @z

 @x Add f_name declaration, and temporaries for efficiency printing.

-- 
Olaf Weber

               (This space left blank for technical reasons.)


More information about the tex-live mailing list