lua-users home
lua-l archive

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


> > > The following script crashes lua.exe under Win2K/VC.NET. 
> > > 
> > > -----------------------------------------------
> > > function co_func (current_co)
> > >    coroutine.resume(current_co)
> > > end
> > > 
> > > local co = coroutine.create(co_func)
> > > coroutine.resume(co, co)
> > > -----------------------------------------------
> > 
> > The above script runs OK on my machine, Linux 2.4.20-386, Debian
> > testing.  However, if I repeat the last line, I get a seg fault!
> 
> Same here, on Win98SE/VC6: no crash on the program as is, crash if the
last
> line is repeated.

Additional informations:
If I add a print"cf" at the start of co_func, that's OK.
If I add a print(current_co), I get "thread: 00775E40" and a crash...
If I add a print(co_func) before the local declaration, it still crashes,
but I add a print(co) after the 
declaration, it no longer crashes...

OTH.

-- 
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--

+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!