c-semantics icon indicating copy to clipboard operation
c-semantics copied to clipboard

if use kcc to compile LuaJIT's minilua, it will run out of memory

Open Lycbel opened this issue 7 years ago • 0 comments

system info
Ubuntu 16.04.5 with 5GB memory
kcc: version 1.0 GNU-compatible Build number: 77a4079-1542856183611

if use kcc to compile minilua (one executable file LuaJIT need), it will run out of memory: to reproduce the problem:

wget https://github.com/Lycbel/cs510Files/blob/master/report6/LuaJit/luajit_minilua_part/luajit_minilua_part.zip?raw=true -O luajit_minilua_part.zip
unzip luajit_minilua_part.zip
cd luajit_minilua_part
bash run.sh

error:

.....................
....................................
Type of lvalue (unsigned long) not compatible with the effective type of the object being accessed (struct lua_State):
      > in luaM_realloc_ at host/minilua.c:557:1
        in luaD_protectedparser at host/minilua.c:1256:5
        in lua_load at host/minilua.c:5794:1
        in luaL_loadfile at host/minilua.c:6170:1
        in main at host/minilua.c:7759:1

    Undefined behavior (UB-EIO10):
        see C11 section 6.5:7 http://rvdoc.org/C11/6.5
        see C11 section J.2:1 item 37 http://rvdoc.org/C11/J.2
        see CERT-C section EXP39-C http://rvdoc.org/CERT-C/EXP39-C
        see MISRA-C section 8.1:3 http://rvdoc.org/MISRA-C/8.1

Type of lvalue (union GCObject *) not compatible with the effective type of the object being accessed (struct lua_TValue):
      > in lua_tolstring at host/minilua.c:5491:1
        in main at host/minilua.c:7765:1

    Undefined behavior (UB-EIO10):
        see C11 section 6.5:7 http://rvdoc.org/C11/6.5
        see C11 section J.2:1 item 37 http://rvdoc.org/C11/J.2
        see CERT-C section EXP39-C http://rvdoc.org/CERT-C/EXP39-C
        see MISRA-C section 8.1:3 http://rvdoc.org/MISRA-C/8.1

Type of lvalue (union GCObject) not compatible with the effective type of the object being accessed (union TString):
      > in lua_tolstring at host/minilua.c:5491:1
        in main at host/minilua.c:7765:1

    Undefined behavior (UB-EIO10):
        see C11 section 6.5:7 http://rvdoc.org/C11/6.5
        see C11 section J.2:1 item 37 http://rvdoc.org/C11/J.2
        see CERT-C section EXP39-C http://rvdoc.org/CERT-C/EXP39-C
        see MISRA-C section 8.1:3 http://rvdoc.org/MISRA-C/8.1
Error: not enough memory

Lycbel avatar Nov 30 '18 06:11 Lycbel