[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: ANN: Alien 0.3.1
- From: "Fabio Mascarenhas" <mascarenhas@...>
- Date: Wed, 13 Feb 2008 14:32:45 -0200
Turns out it was my fault after all, I forgot about the NX bit! I was
allocating memory for the callback trampolines with lua_newuserdata,
which uses malloc, which allocates on a page without execute
permission... I took a trampoline allocator from Python ctypes that
uses mmap behind the scenes and now it works.
I uploaded a new rockspec and updated http://alien.luaforge.net. The
version got bumped to 0.3.2. Sorry for the noise. :-) I forgot I had
ssh access to a x64 machine, or would have tested on it too.
On Feb 13, 2008 6:35 AM, Thomas Harning <firstname.lastname@example.org> wrote:
> Fabio Mascarenhas wrote:
> Just a note: on AMD64 it appears that test_libc.lua works.
> The normal tests do not, though... it segfaults @ _testfunc_callback_i_if ()
> #0 0x00000000005157e8 in ?? ()
> #1 0x00002ae74fc98544 in _testfunc_callback_i_if (value=262144,
> at tests/alientest.c:155
> #2 0x00002ae74f88fbe0 in ffi_call_unix64 () from
> #3 0x00002ae74f88f629 in ffi_call (cif=0x7fff5b247810,
> fn=0x2ae74fc98530 <_testfunc_callback_i_if>, rvalue=0x7fff5b24784c,
> avalue=0x7fff5b2477a0) at src/x86/ffi64.c:428
> #4 0x00002ae74f88e74b in alien_function_call () from
> Tried tracking it down to make sense of it... it almost looks like the
> function address is being truncated to 32-bits...