Code: Select all
function boom()
local a = { b = { } }
a.b.c = a
return a
end
remote.add_interface("boom", { boom = boom })
Code: Select all
/c remote.call("boom", "boom")
(Edit: Fixed formatting.)
Code: Select all
function boom()
local a = { b = { } }
a.b.c = a
return a
end
remote.add_interface("boom", { boom = boom })
Code: Select all
/c remote.call("boom", "boom")
Code: Select all
/c remote.call("QuickItemSwap", "eval", "a = { b = {}} ; a.b.c = a; return a")
Code: Select all
/c remote.add_interface('boom',boom=function() a={b={}} a.b.c=a return a end)
/c game.print(serpent.line(remote.call('boom','boom').b.c)) -- add/remove `.b.c`'s to see the return's recursive
You're calling a remote interface on the same lua instance which is just a function call when you do it all in the consolequyxkh wrote:This doesn't reproduce for me in 15.40 plain vanilla:
Code: Select all
/c remote.add_interface('boom',boom=function() a={b={}} a.b.c=a return a end) /c game.print(serpent.line(remote.call('boom','boom').b.c)) -- add/remove `.b.c`'s to see the return's recursive
Yeah. The timing was actually kind of funny; I had asked earlier on Discord if it's safe to assume remote.call will always return a copy of the structure (i.e. meaning I don't need to duplicate it myself to prevent other mods from mutating the result) and the answer was "unless you call it from within the same mod".quyxkh wrote:Ah. And calling a mod-supplied version of that remote certainly does go 'boom', sigsegv on a corrupted doubly-linked list. Wasn't expecting lua to detect that it could shortcircuit the local call, or ... oh, I'm guessing the error's in your copyback? nevermined, y'all are busy enough