You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Interpreter doesn't validate "unused" bits terminal byte in varint #746
I belive the encoded value 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0xff 0x7e is not valid as a 64-bit signed varint, as the value it is decoded to, 9151314442816847872, should be encoded as 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0xff 0x00, where the top bits of the last byte are a sign-extension of the sign bit (the least-significant bit).
No, this is indeed a bug in the interpreter, the shift for the mask it used was off by one. Fixed in #750, with a range of new binary tests for LEB encodings. PTAL
Activity
binji commentedon Mar 13, 2018
cc @rossberg, am I misunderstanding the spec here? v8's implementation at least matches this behavior.
rossberg commentedon Mar 13, 2018
No, this is indeed a bug in the interpreter, the shift for the mask it used was off by one. Fixed in #750, with a range of new binary tests for LEB encodings. PTAL