lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Alexander Gladysh wrote:

>> (BTW, there are some strange things in your trace that may be caused by some
>> optimizations. In entry #5, loadlib.c:64 is function ll_unloadlib,
>> not gctm, and there is no argument 'L' there...)
> 
> You're right, thanks! It turns out that I'm building Lua and C module
> shared libraries with -O3 (and my application with -O0). I was not
> able to reproduce this segfault with Lua and modules built with -O0...

I've heard that on GCC 4, -O3 can produce bloated code that doesn't
really run much, if at all, faster than -O2, and sometimes runs slower.
 I'd suggest using -O2 instead if it works.

(I haven't verified these claims, however.)

-- 
Irayo