lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I fixed a few bugs in the yield patch.  Big thanks to Roberto I. and
Arvid Norberg for the bug reports.  See
http://www.lua-users.org/wiki/LuaPowerPatches for the current version
of the patch.

Summary of bugs fixed:

	> _ERRORMESSAGE = function (x) print(x) end
	> a = a+1
	attempt to perform arithmetic on global `a' (a nil value)

[previously, this would hang or seg fault]

	> function my_func() yield() end
	> my_func() if (nil > nil) then end

[previously, this would hang or seg fault]

	program.lua:
		function foo() a=a+1 end	-- a is nil; will cause error
		foo()

	# lua program.lua

[previously, the stack backtrace from the error would possibly lack
line numbers, and lua would hang or seg fault]

There is still at least one bug surrounding error handling.  For example,
if you do:

	> dofile("program.lua")

from an interactive session, and program.lua does a yield(), then lua
may seg fault.

Since I only have limited time to work on this, I figured I'd release
the bug fixes so far.  More bug reports, and especially patches or
insight, are greatly appreciated.

-- 
Thatcher Ulrich <tu@tulrich.com>
http://tulrich.com