[tex-live] Re: [tex-implementors] Re: bug in etex

Jonathan Kew jonathan_kew at sil.org
Wed Jul 14 15:50:47 CEST 2004


On 14 Jul 2004, at 2:02 pm, Peter Breitenlohner wrote:

> Hi Olaf,
>
> your analysis of the problem is certainly correct. The proposed change 
> will
> indeed avoid the segmentation fault but will NOT yield correct results.
>
> There is something basically wrong with (that part of) the sparse 
> array handling.
>
> The basic idea is that the
> 	\toksdef\whatevertoks = 266
> should first create that token register (if it doesn't already exist) 
> and
> then increase its reference count, such that this register will not
> disappear. Thus a later reference to \whatevertoks should work without 
> such
> a safeguard.
>
> Somehow the logic of all that is brokem somewhere and I'll have to 
> find out
> where.

I'm not sure that this is precisely what's broken (though I may just be 
displaying ignorance here).

Seems to me that the key line that triggers trouble is

   \immediate\write16{t={\the\toks265}}

where \toks265 has NOT previously been created with \toksdef. If I 
change this \write to use \toks267, which was defined with \toksdef but 
has not actually been assigned to, all is well.

Would a direct reference like this to an as-yet-uncreated token 
register lead to the null cur_ptr that may need to be checked?

Jonathan



More information about the tex-live mailing list