+++ Wookey [2016-03-18 18:42 +0000]: A bit more detail from the gdb session: (gdb) bt full #0 getcurrenv (L=0xffffb7d80378, L=0xffffb7d80378) at lj_api.c:76 fn = 0x7fffb7d80378 #1 cpcall (L=0xffffb7d80378, func=0x404c08 <pmain>, ud=0x0) at lj_api.c:1062 fn = 0x7fffb7d80378 top = <optimized out> #2 0x00000000004379d8 in lj_vm_cpcall () at buildvm_arm64.dasc:1182 No locals. #3 0x000000000042bc3c in lua_cpcall (L=L@entry=0xffffb7d80378, func=func@entry=0x404c08 <pmain>, ud=ud@entry=0x0) at lj_api.c:1079 g = 0xffffb7d803d8 oldh = 0 '\000' status = -1210580104 #4 0x000000000040406c in main (argc=1, argv=0xfffffffff518) at luajit.c:564 status = <optimized out> L = 0xffffb7d80378 (gdb) list 71 } 72 73 static GCtab *getcurrenv(lua_State *L) 74 { 75 GCfunc *fn = curr_func(L); 76 return fn->c.gct == ~LJ_TFUNC ? tabref(fn->c.env) : tabref(L->env); 77 } 78 79 /* -- Miscellaneous API functions ----------------------------------------- */ 80 (gdb) p fn->c Cannot access memory at address 0x7fffb7d80378
So that top 48th bit missing from the pointers looks wrong. Aarch64 has 48 bits, not the 47 of x86_64. And we see things like this in the code: lj_def.h:#define LJ_MAX_MEM64 ((uint64_t)1<<47) /* Max. 64 bit memory allocation. */ lj_def.h:#define checkptr47(x) (((uint64_t)(x) >> 47) == 0) Wookey -- Principal hats: Linaro, Debian, Wookware, ARM http://wookware.org/
signature.asc
Description: Digital signature