[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: [SOLVED] Re: and/or missbehaviour in embedded lua 5.1
- From: Andreas Stenius <kaos@...>
- Date: Fri, 17 Mar 2006 12:57:15 +0100
Andreas Stenius skrev:
Kein-Hong Man skrev:
Andreas Stenius wrote:
Kein-Hong Man skrev:
[snip snip]
Without a debugger, peppering lcode.c with printfs should be fine.
Said and done :)
After a few hours of peppering, I got this log file:
http://kaos.explosive.se/files/Lua_5.1_060317.TXT
Not inlined, due to it's quite long..
I've not looked at it myself yet, am about to do so now, just want
to get it out too, so you can have a look too.
Bingo. I've got a candidate:
Line 735, lcode.c:
e1->k = e2->k; e1->u.s.info = e2->u.s.info;
e1->u.s.aux = e2->u.s.aux; e1->t = e2->t;
Borks when int is 2 bytes and lua_Number is 8 bytes.
Looks like a bug.
Haha! Was just about to write the same thing!!
Thanks alot for the help!
I'll let you know when I've fixed this if it works then.
//Andreas
YES!
Ok, it does work now!
New log for anyone interested is:
http://kaos.explosive.se/files/Lua_5.1_060317_3.TXT
Here's my case OPR_AND:
case OPR_AND: {
lua_assert(e1->t == NO_JUMP); /* list must be closed */
luaK_dischargevars(fs, e2);
luaK_concat(fs, &e1->f, e2->f);
e1->k = e2->k; //e1->u.s.info = e2->u.s.info;
/*e1->u.s.aux = e2->u.s.aux;*/ e1->t = e2->t;
e1->u = e2->u;
break;
}
Notice: there are more places in luaK_posfix that need to be fixed as
well. Spotted those, so that's no problem.
Is expdesc used in this way in any other files, or do I need to go
fishing.. ?
Thanks for pushing me to go through this, Kein-Hong!
Cheers,
Andreas
- References:
- and/or missbehaviour in embedded lua 5.1, Andreas Stenius
- Re: and/or missbehaviour in embedded lua 5.1, D Burgess
- Re: and/or missbehaviour in embedded lua 5.1, Andreas Stenius
- Re: and/or missbehaviour in embedded lua 5.1, Kein-Hong Man
- Re: and/or missbehaviour in embedded lua 5.1, Andreas Stenius
- Re: and/or missbehaviour in embedded lua 5.1, Kein-Hong Man
- Re: and/or missbehaviour in embedded lua 5.1, Andreas Stenius
- Re: and/or missbehaviour in embedded lua 5.1, Kein-Hong Man
- Re: and/or missbehaviour in embedded lua 5.1, Andreas Stenius
- Re: and/or missbehaviour in embedded lua 5.1, Kein-Hong Man
- Re: and/or missbehaviour in embedded lua 5.1, Andreas Stenius