[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [SOLVED] Re: and/or missbehaviour in embedded lua 5.1
- From: Mike Pall <mikelu-0603@...>
- Date: Fri, 17 Mar 2006 13:55:19 +0100
Hi,
Andreas Stenius wrote:
> - e1->u.s.info = e2->u.s.info; e1->u.s.aux = e2->u.s.aux;
> + e1->u = e2->u;
Ok, this is a serious bug in Lua 5.1. It's only visible if
sizeof(int)*2 < sizeof(lua_Number). I.e. it probably only affects
16 bit CPUs with lua_Number defined as a double. But the original
assignments depend on a side-effect (full overlap) not guaranteed
by the standard (even on 32/64 bit CPUs).
But the fix bears the question: is union assignment part of C89?
Bye,
Mike
- References:
- 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
- [SOLVED] Re: and/or missbehaviour in embedded lua 5.1, Andreas Stenius