URL:
<http://savannah.nongnu.org/bugs/?39470>
Summary: Lua plugin has a broken C stack.
Project: WeeChat
Submitted by: None
Submitted on: Fri 12 Jul 2013 04:17:44 AM UTC
Category: script plugin
Severity: 3 - Normal
Item Group: other
Status: None
Privacy: Public
Assigned to: None
Originator Name: Jason
Originator Email: [email protected]
Open/Closed: Open
Discussion Lock: Any
Release: 0.4.2-dev
IRC nick: JustAPerson
_______________________________________________________
Details:
The following Lua script does not work as expected.
weechat.register('test', 'JustAPerson', '0.1', 'MIT', 'Broken C Stack bug',
'', '')
local function func()
weechat.print('', 'This will cause an error and is never actually
printed')
end
local thread = coroutine.create(func) -- loads `func` in a separate lua_State
coroutine.resume(thread) -- should be equivalent to `func()`
I have attached a patch specific to weechat_lua_api_print(). A similar
solution will need to be applied to *every* public weechat_lua_api_* function.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 12 Jul 2013 04:17:44 AM UTC Name: patch Size: 755B By: None
<http://savannah.nongnu.org/bugs/download.php?file_id=28547>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?39470>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
_______________________________________________
Weechat-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/weechat-dev