Comments (3)
yeah, we'll look into it. Thanks for the reminder.
from luajit2.
@agentzh I have responded to your queries on #77 , could you please have a look ? Thank you!
from luajit2.
@agentzh what's the current state with ppc64 support in LuaJIT2?
The recent code (v2.1-20190507-206-gfe08842) fails to build on ppc64le without the following patch:
diff --git a/src/lib_jit.c b/src/lib_jit.c
index e60ccac..1bf67a7 100644
--- a/src/lib_jit.c
+++ b/src/lib_jit.c
@@ -150,10 +150,10 @@ LJLIB_CF(jit_attach)
LJLIB_CF(jit_prngstate)
{
+ int i;
GCtab *cur = lj_tab_new(L, 8, 0);
#if LJ_HASJIT
- int i;
jit_State *J = L2J(L);
/* The old state. */
@@ -201,7 +201,7 @@ LJLIB_CF(jit_prngstate)
J->prng = prng;
}
#else
- for (int i = 1; i <= 8; i++)
+ for (i = 1; i <= 8; i++)
setintV(lj_tab_setint(L, cur, i), 0);
#endif
settabV(L, L->top++, cur);
diff --git a/src/lj_ccallback.c b/src/lj_ccallback.c
index 3dbf1e9..aaf3934 100644
--- a/src/lj_ccallback.c
+++ b/src/lj_ccallback.c
@@ -226,7 +226,7 @@ static void *callback_mcode_init(global_State *g, uint32_t *page)
MSize slot;
#if LJ_ARCH_PPC_ELFV2
// Needs to be in sync with lj_vm_ffi_callback.
- lua_assert(CALLBACK_MCODE_SIZE == 4096);
+ lj_assertG(CALLBACK_MCODE_SIZE == 4096);
for (slot = 0; slot < CALLBACK_MAX_SLOT; slot++) {
*p = PPCI_B | (((page+CALLBACK_MAX_SLOT-p) & 0x00ffffffu) << 2);
p++;
But even when it builds without issues, luajit fails to start occasionally:
-bash-4.2$ luajit
LuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2021 Mike Pall. https://luajit.org/
JIT: OFF
>
-bash-4.2$ luajit
luajit: cannot create state: not enough memory
-bash-4.2$ luajit
LuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2021 Mike Pall. https://luajit.org/
JIT: OFF
>
-bash-4.2$ luajit
luajit: cannot create state: not enough memory
-bash-4.2$ luajit
LuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2021 Mike Pall. https://luajit.org/
JIT: OFF
>
-bash-4.2$ luajit
luajit: cannot create state: not enough memory
Plenty of memory available though:
-bash-4.2$ head -3 /proc/meminfo
MemTotal: 33504576 kB
MemFree: 27553024 kB
MemAvailable: 30952256 kB
(ipcs
also doesn't show anything meaningful)
Target system is RHEL 7.4 (Linux 3.10.0-693.21.1.el7.ppc64le), gcc 4.8.5 20150623 (Red Hat 4.8.5-16).
from luajit2.
Related Issues (20)
- MIPS environment has a bug in version 20220310 HOT 1
- pcall problem when calling require HOT 13
- minilua android build HOT 2
- lj_str_new and lj_tab hashkey CPU 100% HOT 7
- nginx: lua atpanic: Lua VM crashed, reason: not enough memory HOT 3
- upgrading the luajit the CPU increased by 20% ,performance drop HOT 9
- Math functions not working on s390x
- Tests failing for s390x HOT 2
- Too many callbacks in s390x HOT 1
- iterate over non-empty table got empty HOT 3
- loongarch64, lj_arch.h:73:2: error: #error "No support for this architecture (yet)" HOT 3
- Tests failing for ppc64le HOT 4
- unexpected index -1 comes up when copy a table with only one element HOT 9
- hash_128_above can only cover half string for hash compute HOT 1
- Failed to start The OpenResty Application Platform. HOT 1
- fails to build for iOS simulator
- Versioning info confusion.
- error: “bad light userdata pointer” On AArch64 when Enable Memory Tagging Extension feature
- arm64 luajit loop cpu nearly 100% in lua_resume function,same code run in x86 is ok HOT 3
- 编译后静态库体积大 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luajit2.