Skip to content

Conversation

half-duplex
Copy link

Attempt to fix failures decompiling SETLIST instructions without an active table.

$ cat test.lua
local foo = {0}
print() -- to prevent optimizing to nothing
$ luac5.1 -s test.lua
$ luadec luac.out
cannot find blockend > 5 , pc = 4, f->sizecode = 6
cannot find blockend > 6 , pc = 5, f->sizecode = 6
-- Decompiled using luadec 2.2 rev: 895d923 for Lua 5.1 from https://github.com/viruscamp/luadec
-- Command line: luac.out

-- params : ...
-- function num : 0
local l_0_0 = {}
-- DECOMPILER ERROR at PC2: No list found for R0 , SetList fails

-- DECOMPILER ERROR at PC3: Overwrote pending register: R1 in 'AssignReg'

;
(0)()

I'm not sure what lua code the original decompiler code was built to handle, so I have little confidence I did not break that.

Previously failed on e.g. `print({0})` in `luac5.1 -s`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant