[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: L->ci>top less than L->top? (Lua 5.1)
- From: Tim Gogolin <tgogolin@...>
- Date: Wed, 15 Feb 2006 13:55:05 -0600
On Oct 12, 2005, David Morris-Oliveros posted to this list (title:
"Possible bug?"). He was experiencing confusion that under some
circumstances, L->ci->top might be less then L->top, and naive code
to iterate the values on the "top" of the lua stack (from C) was
running into undefined behavior.
Mike Pall suggested that the existing lua behavior might be
considered erroneous (or at least inconsistent with other behavior
elsewhere). He suggested the patch:
> Simple fix: add the following line in ldo.c at the end of
luaD_seterrorobj():
> if (L->top > L->ci->top) L->ci->top = L->top;
I just pulled the RC source for lua 5.1 and the code in
luaD_seterrorobj() is the same as it was before; it doesn't appear to
have any code similar to Mike's suggestion. Is this likely to be
addressed for Lua 5.1 final? As I prepare to put the latest lua
distribution into our app, I'm going over a list of all the places
we've modified the source (to see if there will be any difficulties
with pulling Lua 5.1 final), and I just noticed that this hasn't been
addressed.
Has it been deemed to not be important, or was it missed?
-- Tim Gogolin
Adobe engineer