Closed jjensen closed 12 years ago
On Thu, May 10, 2012 at 3:18 PM, Josh Jensen < reply@reply.github.com
wrote:
typedef struct _SYSTEM_INFO { union { unsigned long dwOemId; struct { unsigned short wProcessorArchitecture; unsigned short wReserved; } ; } ; unsigned long dwPageSize; void* lpMinimumApplicationAddress; void* lpMaximumApplicationAddress; unsigned long dwActiveProcessorMask; unsigned long dwNumberOfProcessors; unsigned long dwProcessorType; unsigned long dwAllocationGranularity; unsigned short wProcessorLevel; unsigned short wProcessorRevision; } SYSTEM_INFO;
dwActiveProcessorMask should be DWORD_PTR or uintptr_t btw. When I first ran this I was running in windows 64 bit and was wondering why I had 0 processors... See http://msdn.microsoft.com/en-us/library/windows/desktop/ms724958(v=vs.85).aspx
Thanks for the report. I've pushed a fix.
-- James
Using the ffi call below with latest luaffi, the following crashes in copy_submembers() on this line:
Running under LuaJIT yields a proper result and no crash.
Thanks for the help!
-Josh