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
js_buffer_write does not handle encoding tag 6 (utf16le/ucs2), the same dormant gap PR #10644 fixed in its js_buffer_write_len sibling #10645
Found while fixing #10426 (PR #10644), which added the internal <encoding>Slice/<encoding>Write methods to Buffer.prototype and, in doing so, had to fix a dormant gap in js_buffer_write_len: encoding tag 6
(utf16le/ucs2) was never handled, so the newly-added ucs2Write would not have worked.
js_buffer_write — the no-length sibling of js_buffer_write_len — has the same missing-encoding gap and was
deliberately left alone as out of scope for that PR.
It is dormant in the same way the other one was: nothing reached it with encoding tag 6 before, so it produced no
visible symptom. That changes as soon as something routes a utf16le/ucs2 write through the no-length path.
Fix shape is already written — mirror what PR #10644 did to js_buffer_write_len in crates/perry-runtime/src/object/native_module/buffer_dispatch.rs. A test should cover both entry points with all
encodings, so the two cannot drift apart again; the reason this one was missed is precisely that the two siblings
were fixed independently.
Activity
fix(buffer): align both write entry points on encoding tags (#10645)
fix(buffer): align both write entry points on encoding tags (#10645)
fix(buffer): align both write entry points on encoding tags (#10645)
fix(buffer): align both write entry points on encoding tags (#10645)
fix(buffer): align both write entry points on encoding tags (#10645)