Skip to content

Deserializer changes broke bytecode interpretation #23

Description

@qux-bbb

test.lua:

hello = 'hello'
print(hello)
len = string.len(hello)
print(len)
the_num = 1 + 2
print(the_num)
float_num = 3.14
print(float_num)

mytable = {}
mytable.foo = "hello world"
mytable.bar = 1 + 2
print(mytable)

function sayhello(name)
    print("hello, "..name)
end

This command can generate Out.lua:

cargo run -- --file test.lua

Then I try to run Out.lua, the error:

$ lua ./Out.lua 
lua: ./Out.lua:1: attempt to perform arithmetic on a nil value
stack traceback:
	./Out.lua:1: in function <./Out.lua:1>
	(tail call): ?
	./Out.lua:1: in function '_R'
	./Out.lua:1: in function '_03'
	./Out.lua:1: in function <./Out.lua:1>
	(tail call): ?
	./Out.lua:1: in function 'a'
	./Out.lua:1: in main chunk
	[C]: ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions