Format file differences (was: Re: pdflatex does not work on win after todays update but does on linux)

Jonathan Kew jfkthame at gmail.com
Tue Jun 15 20:26:03 CEST 2021


On 15/06/2021 19:02, Jonathan Fine wrote:
> Hi Andreas
> 
> You wrote
> 
>     On a multiplatform installation all format-files are stored
>     under /texmf-var/web2c without any further directories for different OS
> 
> 
>   This is useful information. It shows that TeX-Live assumes that format 
> files are platform independent. As Karl has responsibility for both 
> TeX-Live and pdftex, it may be correct to say that this platform 
> independence is an undocumented feature.
> 
> I'm now going to make a wild guess. Even if wrong, the thinking leading 
> up to the guess might be helpful. In the file web2c/pdftexdir/ptexmac.h 
> C-language macros dumpcharptr(a) and undumpcharptr(s) are defined. They 
> were added on 20 Jan 2021. I suggest looking for an error in these 
> macros, or in the use of these macros.

I suspect that the commit 
https://github.com/tex-mirror/pdftex/commit/70e0c9c9e95184665909dd447bc80aa08d700822 
made dumps non-portable at least between 32-bit and 64-bit systems, 
because it (un)dumps variables of C type |size_t|, which will typically 
be a 4-byte value in a 32-bit environment, but 8-byte in a 64-bit system.

Hence, I wonder if declaring the |count| and |remaining| variables in 
|dumptounicode| and |undumptounicode| respectively as a portable web2c 
type such as |longinteger| might resolve the problem.

JK

> 
> The following monster URL will bring up for you the definitions.
> https://github.com/tex-mirror/pdftex/commit/70e0c9c9e95184665909dd447bc80aa08d700822#diff-0561d129eac29b0ac46df3edb18316f19ae0ea758bd8ce890f91e9f2f097a84eR223-R245 
> <https://github.com/tex-mirror/pdftex/commit/70e0c9c9e95184665909dd447bc80aa08d700822#diff-0561d129eac29b0ac46df3edb18316f19ae0ea758bd8ce890f91e9f2f097a84eR223-R245>
> 
> In case it's helpful, here's how I found these macro definitions.
> 
> 1. I cloned https://github.com/tex-mirror/pdftex 
> <https://github.com/tex-mirror/pdftex> onto my PC.
> 2. On my PC, I grepped for WIN, returning only a list of file names.
> 3. I filtered to get only the .h file names. There were 47.
> 4. I eyeballed those file names. The following were the only ones in web2c.
> source/src/texk/web2c/pdftexdir/ptexmac.h
> source/src/texk/web2c/pdftexdir/ptexlib.h
> source/src/texk/web2c/texmfmp.h
> source/src/texk/web2c/w2c/config.h
> source/src/texk/web2c/texmfmp-help.h
> source/src/texk/web2c/synctexdir/synctex_parser_utils.h
> source/src/texk/web2c/cpascal.h
> 5. On github I looked at the history of web2c/pdftexdir/ptexmac.h
> 6. This gave as the most recent change a commit
> karl sync with tl 57477, for (un)dump of \pdfglyphtounicode
> 7. BINGO. That (un)dump looks like the addition of a new feature.
> 8. Here's the diff for the commit
> https://github.com/tex-mirror/pdftex/commit/70e0c9c9e95184665909dd447bc80aa08d700822 
> <https://github.com/tex-mirror/pdftex/commit/70e0c9c9e95184665909dd447bc80aa08d700822>
> 9. From there the rest is easy. Just search or eyeball for the string 
> "dump".
> 
> Finally, and perhaps irrelevant, Google and Facebook have lately 
> detected "recidivist machines". Further, "These machines were credibly 
> accused of corrupting multiple different stable well-debugged 
> large-scale applications. Each machine was accused repeatedly by 
> independent teams but conventional diagnostics found nothing wrong with 
> them."
> 
> Further in one case "Google's errant hardware conducted what might be 
> described as an auto-erratic ransomware attack." Further "One of our 
> mercurial cores corrupted encryption. It did it in such a way that only 
> it could decrypt what it had wrongly encrypted."
> 
> You can read more here: 
> https://www.theregister.com/2021/06/04/google_chip_flaws/ 
> <https://www.theregister.com/2021/06/04/google_chip_flaws/>
> 
> So how is this related to the cross-platform dump / undump problem? 
> Perhaps both the Windows and Linux versions are correct in that they can 
> undump what they dump. So single platform testing will not detect the 
> error. Indeed there is no error, until either the dump is sufficiently 
> documented, or until cross platform behaviour is required and tested.
> 
> I hope this helps.
> -- 
> Jonathan
> 
> 
> 
> 
> 
> 
> 
> 



More information about the tex-live mailing list.