[tex-k] (fwd) Bug#633011: /usr/bin/tex crashes on every *.tex file

Peter Breitenlohner peb at mppmu.mpg.de
Fri Jul 8 10:35:47 CEST 2011


On Fri, 8 Jul 2011, Norbert Preining wrote:

> Hi everyone here,
>
> here at Debian we got an interesting bug report, and I can
> confirm it. tex binary (I know, it is the one form 2009)
> crashes with seg fault on an empty file. That seems to have
> been introduced with a new compiler or linker.
>
> THe OP (big thanks) also proposes a patch.
>
> I checked current TL development sources and the respective code is
> still present in
> 	enctex.ch
> where at line 14 it is
> 	mubyte_cswrite: array [0..127] of pointer;
> and then in line 45
> 	for i:=0 to 128 do mubyte_cswrite[i]:=null;

Hi Karl, Norbert,

this is definitely a bug and the patches below should be applied.  The
effect depends on the arrangement of the various arrays in memory, and it is
quite possible that this has been changed by a new compiler/linker.

The relevant code in xetex.ch was introduced in TL SVN r5537 (2007-11-21)
and I am sure the corresponding code in enctex.ch is at least that old.  So
should this be fixed right now for the DVD or only after the freeze?

It is a pity, such long standing bugs are detected this late stage in the
release process.

> ----- Forwarded message from Roderich Schupp <roderich.schupp at googlemail.com> -----
>
>> --- a/texk/web2c/tex.ch	2011-07-07 21:26:55.779344956 +0200
>> +++ b/texk/web2c/tex.ch	2009-08-12 23:40:14.000000000 +0200
>> @@ -371,7 +371,7 @@
>>  {Initialize enc\TeX\ data.}
>>  for i:=0 to 255 do mubyte_read[i]:=null;
>>  for i:=0 to 255 do mubyte_write[i]:=0;
>> -for i:=0 to 128 do mubyte_cswrite[i]:=null;
>> +for i:=0 to 127 do mubyte_cswrite[i]:=null;
>>  mubyte_keep := 0; mubyte_start := false;
>>  write_noexpanding := false; cs_converting := false;
>>  special_printing := false; message_printing := false;
>> --- a/texk/web2c/xetexdir/xetex.ch	2011-07-07 21:26:55.779344956 +0200
>> +++ b/texk/web2c/xetexdir/xetex.ch	2011-07-07 21:26:55.779344956 +0200
>> @@ -335,7 +335,7 @@
>>  {Initialize enc\TeX\ data.}
>>  for i:=0 to 255 do mubyte_read[i]:=null;
>>  for i:=0 to 255 do mubyte_write[i]:=0;
>> -for i:=0 to 128 do mubyte_cswrite[i]:=null;
>> +for i:=0 to 127 do mubyte_cswrite[i]:=null;
>>  mubyte_keep := 0; mubyte_start := false;
>>  write_noexpanding := false; cs_converting := false;
>>  special_printing := false; message_printing := false;
>
>
> ----- End forwarded message -----

Regards
Peter


More information about the tex-k mailing list