[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] LuaJIT x64 port sponsorship program
- From: Patrick Donnelly <batrick@...>
- Date: Wed, 3 Feb 2010 11:52:07 -0500
On Tue, Feb 2, 2010 at 12:30 PM, Mike Pall <mikelu-1002@mike.de> wrote:
> Florian Weimer wrote:
>> I raised this on the x86_64 ABI mailing list. The belief over there
>> is that all 2**64 pointer values are valid per the ABI. It's just
>> that *addresses of objects* will always fall in the 2**48 sub-range.
>
> Well, C99 makes no such distinction. It ties the definition of a
> valid pointer to where it can legally point to. But the x86_64 ABI
> is wedded to POSIX, anyway. Which adds another bunch of rules to
> the mix. I guess we could argue about standards ad infinitum
> without getting anywhere ...
>
> What really counts is commonly accepted usage. So, while I can buy
> the need for MAP_FAILED et al, any reasonable Lua/C binding ought
> to convert this to nil or throw an error. And using lightuserdata
> for 64 bit integers is more like a hack or a workaround, which
> isn't even portable to 32 bit CPUs. Most other uses probably *do*
> pass valid pointers to objects.
What about "sentinel" defined values like those in the socket
libraries. On my GNU system:
#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
I'm not sure why someone would want to push a SIG_ERR lightuserdata
but I imagine it could come up.
Great job on LuaJIT 2.0. I'm looking forward to the x86-64 port!
--
- Patrick Donnelly