[tlbuild] TexLive-20110705-source build
Niko Sauer
nikos at iburst.co.za
Mon Mar 26 16:46:22 CEST 2012
TexLive-20110705-source compiles with gcc-4.6.2/glibc-2.14.1 without
difficulties. However, when "tex file.tex" is run, a stack overflow
occurs. This is due to a coding glitch in the source. There is a pointer
overrun.
The glitch was even present in the old TeTeX-3.0, but older
gcc-versions seemed to be more lenient on it.
In TL-20110705-source the problem occurs in
texk/web2c/enctex.ch
and
texk/web2c/xetexd/xetex.ch
It can can be fixed by two sed-lines:
sed -i "s|array \[0..127\]|array \[0..128\]|" texk/web2c/enctex.ch &&
sed -i "s|array \[0..127\]|array \[0..128\]|" texk/web2c/xetexd/xetex.ch
Below is a patch to the same effect:
texlive-2011-pointers.patch
___________________________
diff -Naur texlive-20110705-source/texk/web2c/enctex.ch
texlive-20110705-source.mod/texk/web2c/enctex.ch
--- texlive-20110705-source/texk/web2c/enctex.ch 2011-01-09
17:18:42.000000000 +0200
+++ texlive-20110705-source.mod/texk/web2c/enctex.ch 2012-03-22
17:06:50.938086446 +0200
@@ -11,7 +11,7 @@
{ non zero iff character begins the multi byte code }
mubyte_write: array [ASCII_code] of str_number;
{ non zero iff character expands to multi bytes in log and write
files }
-mubyte_cswrite: array [0..127] of pointer;
+mubyte_cswrite: array [0..128] of pointer;
{ non null iff cs mod 128 expands to multi bytes in log and write
files }
mubyte_skip: integer; { the number of bytes to skip in |buffer| }
mubyte_keep: integer; { the number of chars we need to keep unchanged }
diff -Naur texlive-20110705-source/texk/web2c/xetexdir/xetex.ch
texlive-20110705-source.mod/texk/web2c/xetexdir/xetex.ch
--- texlive-20110705-source/texk/web2c/xetexdir/xetex.ch
2011-04-19 15:44:09.000000000 +0200
+++ texlive-20110705-source.mod/texk/web2c/xetexdir/xetex.ch
2012-03-22 17:06:50.968078747 +0200
@@ -194,7 +194,7 @@
{ non zero iff character begins the multi byte code }
mubyte_write: array [ASCII_code] of str_number;
{ non zero iff character expands to multi bytes in log and write
files }
-mubyte_cswrite: array [0..127] of pointer;
+mubyte_cswrite: array [0..128] of pointer;
{ non null iff cs mod 128 expands to multi bytes in log and write
files }
mubyte_skip: integer; { the number of bytes to skip in |buffer| }
mubyte_keep: integer; { the number of chars we need to keep unchanged }
_______________________________________________________________________
I have tested the compiled (patched) programmes against a number of
existing TeX-files. So far nothing untowards happened.
Niko Sauer
Pretoria
South Africa
More information about the tlbuild
mailing list