[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaJIT, pagezero_size, and valgrind
- From: Mike Pall <mikelu-1104@...>
- Date: Mon, 18 Apr 2011 02:01:22 +0200
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