lua-users home
lua-l archive

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


Hi,

I got a similar issue when trying to use LuaJIT with JNLua and the OS X 64 bits Java JVM... it also segfaults. Since I can't relink the JVM with the -pagezero_size flag I had to stick with Lua 5.1.4.

Benoit.

Le 18 avr. 2011 à 02:01, Mike Pall a écrit :

> Douglas Creager wrote:
>> The comments from the appropriate part of the valgrind source:
>> 
>>    // Don't honour the client's request to map PAGEZERO.  Why not?
>>    // Because when the kernel loaded the valgrind tool executable,
>>    // it will have mapped pagezero itself.  So further attempts
>>    // to map it when loading the client are guaranteed to fail.
> 
> Umm, maybe the Valgrind binary itself can be relinked with the
> -pagezero_size flag?
> 
>> So I'm at an impasse.  I'd love to be able to both (a) use
>> LuaJIT in my app, and (b) run valgrind on it.  Any thoughts on
>> how to proceed?
> 
> Either run the tests on a 32 bit binary or run the tests on
> Linux/x64 (where Valgrind works just fine).
> 
>> How big of a change would it be to make LuaJIT's allocator not
>> require pagesize_zero, or to have LuaJIT work with a custom
>> allocator on x64?
> 
> No chance. The x64 port needs to allocate memory in the lowest 2GB
> (that's why you are forced to use the built-in allocator). The
> default 4GB pagezero blocks that memory range, so it needs to be
> changed.
> 
> --Mike
>