New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix overflow in older android #81
Conversation
FOUND A FAILING TEST! |
@@ -114,3 +114,18 @@ test('hex of write{Uint,Int}{8,16,32}{LE,BE} with overflow', function (t) { | |||
} | |||
t.end() | |||
}) | |||
test('android issue', function (t) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe name this test "Can read and write Int32BE (ref #80)" or some relevant issue so its clear this will be a regression test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still sussing out the root issue will totally give it a decent test name once it's all ready
ok figured it out and this pull now contains the fix, basically older android wouldn't properly coerce the value into a 8 bit number so we have to add some masking to make sure they do it right |
Hahaha, damn. I should have mentioned that when I re-read through the buffer code for this bug. By chance does it work if you |
I don't think so, the error showed up with sha1 hashes where you where doing that before writing |
Nice catch! |
(though | could be wrong, the main reason I picked |
@calvinmetcalf are you able to test the |
@feross ready to publish |
Thanks for the good work guys – just running tests once more and will publish. |
Published as 3.5.1. |
so now |
@rubensayshi that shouldn't be necessary due to the |
@FiloSottile @Sidnicious @aianus @ajp8164 @barmstrong @bechi @bitjson @bpdavenport @braydonf @caedesvvv @chjj @cmgustavo @coblee @defunctzombie @dionyziz @dominictarr @fanatid @gabegattis @gasteve @gentrysherrill @greenaddress @hudon @ionux @jprichardson @jsorchik @kyledrake @lclc @lord @maksim-s @maraoz @matiu @mihar @pnagurny @robby-dermody @rubensayshi @ryanxcharles @sembrestels @tgerring @thallium205 @unusualbob @vbuterin @weilu @williamcotton @zQueal @zootreeves Please all acknowledge the above bug. This bug affects any use of typed arrays in Android 4.3 [and lower] native web views. If you were using browserify and This bug is now avoided by the above PR, but if this bug is as serious as it looks, it is likely an overflowing assignment may occur elsewhere we haven't found yet. Sorry for tagging so many of you, but short of sending out multiple emails and tracking down all your email addresses, this seemed the most effective way of reaching out. |
for anyone who failed to grasp where this extends into, |
this is build with a browserify fix that affected android 4.3 and lower; feross/buffer#81
this is build with a browserify fix that affected android 4.3 and lower; feross/buffer#81
this is build with a browserify fix that affected android 4.3 and lower; feross/buffer#81
this is build with a browserify fix that affected android 4.3 and lower; feross/buffer#81
this is build with a browserify fix that affected android 4.3 and lower; feross/buffer#81
if the tests take too long I can set up what we do for readable-stream where each browser is it's own saucelabs test
edit by @dcousens: see #81 (comment) for the implications of this PR