[luatex] Lua Profiler

Philipp Stephani st_philipp at yahoo.de
Mon May 16 11:01:28 CEST 2011


Am 16.05.2011 um 03:48 schrieb Reinhard Kotucha:

> Hi,
> I compiled the Lua profiler from
> 
>  http://luaprofiler.luaforge.net
> 
> and installed the shared library in $SELFAUTOLOC/lib .
> 
> It works fine, except that the function profiler.start() ignores its
> argument (the name of the output file).  It always creates a file
> lprof_<random number>.
> 
> However, when I use the same shared library with stock Lua, I get
> 
> Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
>> require('profiler')
>> profiler.start('foo')
>> print('hello')
> hello
>> profiler.stop()
>> os.exit()
> Segmentation fault (core dumped)
> 
> Despite the segmentation fault, it creates a file
> 
> -rw-r--r-- 1 reinhard users     333 May 16 02:57 foo
> 
> at least.
> 
> Did anybody encounter similar problems?

Hello,

how did you compile and install the profiler library? Does your process differ in some way from the steps taken by LuaRocks? I'm asking this because segmentation faults are typical on Unix-like systems when an extension module is linked to a Lua library; so you shouldn't link with e.g. -llua. If you installed the library via LuaRocks and it crashes with stock Lua, then there's definitely a bug somewhere in the library.


More information about the luatex mailing list