[tex-live] Re: [tex-implementors] Re: bug in etex
Peter Breitenlohner
peb at mppmu.mpg.de
Wed Jul 14 15:34:27 CEST 2004
On Wed, 14 Jul 2004, Philip TAYLOR wrote:
>> This does not happen on those systems where min_halfword is defined as
>> 0, as mem[0] and mem[1] are valid array accesses, even if they are
>> semantically invalid in the code doing those accesses.
>
> Intriguingly, Knuth writes :
>
> The minimum halfword value represents a null pointer.
> \TeX\ does not assume that |mem[null]| exists.
>
> whilst in the EteX Pascal source, we find :
>
> CHAA:[006.E-TEX.VMS]ETEX.PAS;2
>
> IF S<>0 THEN BEGIN MEM[0].HH.RH:=MEM[0].HH.RH+1;DELETEGLUEREF(S);
> There's no conflict, but it is intriguing to see that MEM[0] is explicitly
> referenced at a few points in the code ...
Well, well
The line above comes from
@ @<Nullify |width(q)| and the tabskip glue following this column@>=
begin width(q):=0; r:=link(q); s:=glue_ptr(r);
if s<>zero_glue then
begin add_glue_ref(zero_glue); delete_glue_ref(s);
glue_ptr(r):=zero_glue;
end;
end
where zero_glue is @D'd as
@d zero_glue==mem_bot {specification for \.{0pt plus 0pt minus 0pt}}
and mem_bot is @D'd as
@d mem_bot=0 {smallest index in the |mem| array dumped by \.{INITEX};
must not be less than |mem_min|}
It is true that mem[null] need not exist but mem[mem_bot] must exist. In fact
mem[mem_bot..mem_bot+3] contain the glue specification '0pt plus 0pt minus 0pt'
and as such should not be accessed as normal nodes, only as glue_spec.
It so happens that in tex.web null==min_halfword and mem_bot are both @D'd
as 0; this is, however, not true for the Web2C implementation.
regards
Peter Breitenlohner <peb at mppmu.mpg.de>
More information about the tex-live
mailing list