[XeTeX] error: can't allocate region with xelatex

Akira Kakuto kakuto at fuk.kindai.ac.jp
Wed Feb 1 05:59:19 CET 2017


> I encountered the following situation with xelatex.
>
> $ echo x | xelatex \\showthe\\everyjob
>
> This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016)

In r43113 in TeX Live SVN, I have changed texmfmp.c a little:

--- texmfmp.c.orig    Mon Nov 14 16:21:07 2016
+++ texmfmp.c    Wed Feb 01 13:27:04 2017
@@ -2818,6 +2818,8 @@
   unsigned bytesToWrite = 0;
   poolpointer len, i, j;
   string name;
+  if (strstart[s + 1 - 65536L] < strstart[s - 65536L])
+    return NULL;
   len = strstart[s + 1 - 65536L] - strstart[s - 65536L];
   name = xmalloc(len * 3 + 1); /* max UTF16->UTF8 expansion
                                   (code units, not bytes) */

in order to avoid the crash. The change must not give bad effects.
It is not a fix but a stopgap for the problem.

Best,
Akira



More information about the XeTeX mailing list