[Dev-luatex] Memory leak in string.explode()?

Reinhard Kotucha reinhard.kotucha at web.de
Mon Nov 5 02:32:30 CET 2012


On 2012-11-04 at 23:42:04 +0100, Reinhard Kotucha wrote:

 > On 2012-11-04 at 17:08:34 +0100, Taco Hoekwater wrote:
 > 
 >  > On 11/04/2012 03:00 AM, Reinhard Kotucha wrote:
 >  > >
 >  > > When I use the lpeg based function split(), everything is fine, though
 >  > > it's slower than string.explode().  But when I use string.explode(), I
 >  > > see in xosview that memory consumption is steadily growing while the
 >  > > program is running.
 >  > 
 >  > Yup, it leaks. Should be fixed now in repository trunk.
 > 
 > Thanks, Taco.  Works properly now.  The svn version is even much
 > faster than the one in TL.  Factor is abt. sqrt(2).

Hi Taco,
there's bad news though:

---------------------------------
#! /usr/bin/env texlua
--*- Lua -*-

s='abc def'; t=s.explode(' +')
s=' abc def'; t=s:explode(' +')
s='abc def '; t=s:explode(' +')
---------------------------------

Each of the tree lines results in a core dump with rev 4468.  They
don't crash in current TeX Live, though there are no complaints about
the syntax error in the first line (s is a string here, not a table).

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha                                      Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                              mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------


More information about the dev-luatex mailing list