Hello all,
I made a small change about the Proto header format. The diff is as the
following:
*diff --git a/luajit-2.1/src/lj_bcread.c b/luajit-2.1/src/lj_bcread.c*
*index 48c5e7c..0487959 100644*
*--- a/luajit-2.1/src/lj_bcread.c*
*+++ b/luajit-2.1/src/lj_bcread.c*
@@ -319,9 +319,9 @@ GCproto *lj_bcread_proto(LexState *ls)
numparams = bcread_byte(ls);
framesize = bcread_byte(ls);
sizeuv = bcread_byte(ls);
- sizekgc = bcread_uleb128(ls);
sizekn = bcread_uleb128(ls);
sizebc = bcread_uleb128(ls) + 1;
+ sizekgc = bcread_uleb128(ls);
if (!(bcread_flags(ls) & BCDUMP_F_STRIP)) {
sizedbg = bcread_uleb128(ls);
if (sizedbg) {
*diff --git a/luajit-2.1/src/lj_bcwrite.c b/luajit-2.1/src/lj_bcwrite.c*
*index 5e05cae..6b86c25 100644*
*--- a/luajit-2.1/src/lj_bcwrite.c*
*+++ b/luajit-2.1/src/lj_bcwrite.c*
@@ -257,9 +257,9 @@ static void bcwrite_proto(BCWriteCtx *ctx, GCproto *pt)
*p++ = pt->numparams;
*p++ = pt->framesize;
*p++ = pt->sizeuv;
- p = lj_strfmt_wuleb128(p, pt->sizekgc);
p = lj_strfmt_wuleb128(p, pt->sizekn);
p = lj_strfmt_wuleb128(p, pt->sizebc-1);
+ p = lj_strfmt_wuleb128(p, pt->sizekgc);
if (!ctx->strip) {
if (proto_lineinfo(pt))
sizedbg = pt->sizept - (MSize)((char *)proto_lineinfo(pt) - (char
*)pt);
However, when I run luajit -v, it shows:
luajit: table index is nil.
Also I try to build libbc, it also shows the above error. Anything else
that I am missing? Thank you.
--
Best Regards,
Baozeng Ding