lua-users home
lua-l archive

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

* Sam Roberts:

>> Suppose the XML parser object is passed to some other library which
>> uses it some time later, in response to a different call (possibly
>> from Lua code).  This would trigger the callbacks without a call to
> That call was made from lua code. So it has a lua_State pointer, L...
>> lxp_parse on the callstack, which means that the L pointer could be
>> invalid.
> which it would pass to lxp_parse.

Let's assume that expat's XML_Parse function is called directly.  Then
the L in the userdata object is not updated and may have become
invalid (if it's not from the master state, for example).

It might sound a bit silly for expat, but for other cases (like
user-defined functions in SQLite) it's not that far-fetched, IMHO.