[tlbuild] dvi test?

John Hawkinson jhawk at alum.mit.edu
Sun Jan 30 16:31:43 CET 2022


Paul Vojta <vojta at math.berkeley.edu> wrote on Sun, 30 Jan 2022
at 03:16:20 EST in <YfZJVO1JD64FFlmS at math.berkeley.edu>:

> So this leads to the question:  If you add a bunch of verbiage in page 3 and
> beyond, so that the postamble gets pushed past, say, 04000 * (2 or 4 or 8),
> then does the bug occur on older Mac systems?

tldr: No it does not cause the bug to occur where it did not before.
In more detail:

> By the way, looking at the output of "od -c t2a.dvi", I noticed that the
> dvi file's postamble occurs somewhere around 04000 (octal), so maybe the
> extra verbiage in page 3 is necessary to move the postamble out of the
> first bufferfull of the file that is read.

For everyone else not steeped in the DVI format, I think the postamble begins with 0xf8 (0370 octal, 248 decimal).
For t2a, the postamble falls at 04011...or maybe it's the 2nd 0370 at 04100? In any event, after 04000:

0004000  222  \0 350  \0  \0   3 216 216 214 370  \0  \0 003 365 001 203
0004020  222 300 034   ;  \0  \0  \0  \0 003 350 002   y  \0  \0 001 227
0004040   \0  \0  \0 004  \0 003 363 036 032 362   "   V  \0  \n  \0  \0
0004060   \0  \n  \0  \0  \0 006   c   m   b   x   1   0 363 035 214   -
0004100  370 024  \0  \n  \0  \0  \0  \n  \0  \0  \0  \a   c   m   c   s

> So this leads to the question:  If you add a bunch of verbiage in page 3 and
> beyond, so that the postamble gets pushed past, say, 04000 * (2 or 4 or 8),
> then does the bug occur on older Mac systems?

I added a paragraph consisting of 8 lines of 8 words of 7 characters
(with the interword space makes 8) for 512 bytes (01000 octal), to produce t2aa.tex and t2aa.dvi.
And another of the same for t2ab, again t2ac, and t2ad. And a total of 9 such paragraphs for t2ad2:

-rw-r--r--@ 1 jhawk  staff  2184 Jan 22 18:24 t2a.dvi
-rw-r--r--  1 jhawk  staff  2920 Jan 30 10:06 t2aa.dvi
-rw-r--r--  1 jhawk  staff  3656 Jan 30 10:08 t2ab.dvi
-rw-r--r--  1 jhawk  staff  4392 Jan 30 10:17 t2ac.dvi
-rw-r--r--  1 jhawk  staff  5124 Jan 30 10:16 t2ad.dvi
-rw-r--r--  1 jhawk  staff  8884 Jan 30 10:23 t2ad2.dvi

(Apologies for my weird file naming conventions).

At t2ac, the postamble then falls a little after 010240:

0010240   \0  \0   3 216 216 214 370  \0  \0 003 365 001 203 222 300 034
0010260    ;  \0  \0  \0  \0 003 350 002   y  \0  \0 001 227  \0  \0  \0
0010300  004  \0 003 363 036 032 362   "   V  \0  \n  \0  \0  \0  \n  \0
0010320   \0  \0 006   c   m   b   x   1   0 363 035 214   - 370 024  \0

which is pushing it past 04000*2 (010000, wow my octal is rusty).

And for t2ad2, it falls past 020000:

0021060   \0   4 216 216 214 370  \0  \0 024   ? 001 203 222 300 034   ;
0021100   \0  \0  \0  \0 003 350 002   y  \0  \0 001 227  \0  \0  \0 004
0021120   \0 004 363 036 032 362   "   V  \0  \n  \0  \0  \0  \n  \0  \0
0021140   \0 006   c   m   b   x   1   0 363 035 214   - 370 024  \0  \n


And in both cases, there is no behavioral change.
They all crash on the newer Mac and they do not crash on the older Mac.


As for:

> Failing that, the control flow is as follows (I think) (line numbers
> are approximate):
> 
> events.c:6188 (in redraw_page() ) calls redraw()
>   events.c:6035 calls draw_page()
>     dvi-draw.c:2208 calls lseek()
>     dvi-draw.c:2267 calls draw_part()
>       dvi-draw.c:various calls xone() (a macro, which may call xxone())
> 
> So that's where to look (sorry, out of time today).

Thanks. This obviously requires a bit more brain engagement to bang out, so I will look into that later.

--
jhawk at alum.mit.edu
John Hawkinson


More information about the tlbuild mailing list.