[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: is it possible to make longjmp-free Lua?
- From: Jerome Vuarand <jerome.vuarand@...>
- Date: Mon, 27 Jul 2009 10:31:05 +0200
2009/7/27 Juris Kalnins <email@example.com>:
> I'm thinking whether it is possible to modify Lua so that it doesn't do
> setjmp/longjmp stack unwinding.
> One idea is to set some "bad flag" in the state on throw, indicating that
> evaluation should short-circuit until it gets either to nearest try, or to
> top level.
> I did not find any patch or discussion about this. Has anyone attempted this
> before? How large could be the required the change to the internals?
This would mean that all your C libraries would have to be modified to
take that flag into account and do special error handling. This
prevent using many (most?) existing binary modules, unless you patch
every one of them.