[tex-k] mf segault
David Necas (Yeti)
yeti@physics.muni.cz
Sun, 29 Dec 2002 12:09:42 +0100
Hello,
metafont segfaults on i386 Linux on character [52] when run
mf '\mode:=deskjet; mag:=1+150/300; nonstopmode; input crashme'
crashme.mf is attached at the end (be warned, it's monstrous
and it compiles fr ages). It crashes identically on all
installations I have access to now (7.3.2x from TeX Live 6,
7.3.1 from RedHat Psyche, 7.3.7 from Debian Woody, 7.3.7x
from TeX Live 7), so I believe it's generally reproducible.
Otherwise it depends on the resolution, crashing sooner in
higher resolutions, and later in smaller.
Yeti
======================= crashme.mf ======================
font_size 40pt#;
ht#:=40pt#;
s#:=0;
mode_setup;
define_pixels(s);
def ifs(suffix p,t)(expr A,dim) =
begingroup; save i,j,r,s,q,u,l; pair q; picture u;
u=unitpixel transformed currenttransform; l=mexp(mlog(h)*dim+mlog(A));
q=origin; for i:=0 upto 5: q:=q transformed t0; endfor % get to the attractor
for i:=0 step 0.001 until l: r:=uniformdeviate 1000; s:=0; j:=0;
forever: s:=s+p[j]; exitif s>=r; j:=j+1; endfor q:=q transformed t[j];
addto currentpicture also u shifted (floor xpart q,floor ypart q);
endfor endgroup;
enddef;
def transmatrix(expr xr,yr,s) =
begingroup save t; transform t;
(xpart t,ypart t)=s; (xxpart t,xypart t)=xr; (yxpart t,yypart t)=yr;
t endgroup enddef;
def T = transmatrix enddef;
def && = currenttransform:=currenttransform enddef;
def >> = shifted enddef;
def [[ = beginchar(curch,ht#+2s#,ht#,0); transform t[],t; numeric p[],A,dim,i;
pair u[],v[],L,R,U,D; R=-L=.5(w,0); U=-D=.5(0,h);
curch:=curch+1; A=0.003; dim=1.6;
currenttransform:=identity shifted round .5(w,h); enddef;
def ]] = ifs(p,t,A,dim); endchar; enddef;
tracingtitles:=1;
curch:=0;
tracingstats:=3;
def somechar =
"Frac_ml.ifs: ifs2";
[[t0=T((.51347,-.1188),(.1188,.51347),(.0947w,-.02312h)); p0=360;
t1=T((-.70853,.61227),(.61227,.70853),(.06434w,-.14902h)); p1=1000;
&&>>(.12144w,.6604h);]]
enddef;
for j:=0 upto 52: somechar endfor;