Wrong work with OP_SETLIST additional OP code. #7

Closed
opened 2018-07-01 22:31:58 +00:00 by Enyby · 0 comments
Enyby commented 2018-07-01 22:31:58 +00:00 (Migrated from github.com)

4d4a040a6b/src/core/org/luaj/vm2/Print.java (L285)

Here pc incremented but it is local var. So this mistake. pc must be returned from function or something like that for deal with additional op code after OP_SETLIST. See
70cb74b4d6/src/core/org/luaj/vm2/compiler/FuncState.java (L1128)
70cb74b4d6/src/core/org/luaj/vm2/compiler/FuncState.java (L1129)

Also this special case not handled in DebugLib. If table real big, then will case add OP code for store c out of range of possible OP codes.

https://github.com/luaj/luaj/blob/4d4a040a6bb7704682b24cac51dde75d072b4e13/src/core/org/luaj/vm2/Print.java#L285 Here pc incremented but it is local var. So this mistake. pc must be returned from function or something like that for deal with additional op code after OP_SETLIST. See https://github.com/luaj/luaj/blob/70cb74b4d65851ef69240d35b58d9f8d20a73ed1/src/core/org/luaj/vm2/compiler/FuncState.java#L1128 https://github.com/luaj/luaj/blob/70cb74b4d65851ef69240d35b58d9f8d20a73ed1/src/core/org/luaj/vm2/compiler/FuncState.java#L1129 Also this special case not handled in DebugLib. If table real big, then will case add OP code for store `c` out of range of possible OP codes.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: open-autonomous-connection/luaj#7