[luatex] Segfault and kpse.find_file()

Elie Roux elie.roux at telecom-bretagne.eu
Thu Feb 12 15:39:12 CET 2009


Hello,

the dev-luatex doesn't seem to work today, so here are two mails I sent:

I found that a problem in the mplib package was to find mpost.mem in 
TeXLive: It cant be found with kpse.find_file(). I can't be found 
neither with "kpsewhich --format mem --must-exist mpost.mem", but in 
TeXLive 2008, it can be found with "kpsewhich --format mem --engine 
metapost mpost.mem". The problem is that I can't pass the "engine" 
option to kpse.find_file(). Is it is possible to add it? I think it will 
benefit more packages than only mplib.

and the other mail :

s kpse.find_file can't get the path of mpost.mem, I made some 
experimentations and got a segmentation fault with texlua (revision 
1858, on debian/sid 32 bit) on the following code:

kpse.set_program_name("toto")

local filename = "/var/lib/texmf/web2c/metapost/mpost.mem"

function finder (name, mode, ftype)
   if mode == "w" then
       return name
   else
       local result = kpse.find_file(name,ftype)
       if not result and name == "mpost.mem" then
          result = filename
       end
       return result
   end
end

local mpx = mplib.new {
   ini_version = false,
   mem_name = "mpost.mem",
   find_file = finder
}

you have to replace filename by the true value of you mpost.mem to get 
the segfault.

Thank you,
-- 
Elie


More information about the luatex mailing list