GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing github.com — src: make base64 decoding 10-15% faster by bnoordhuis · Pull Request #2193 · nodejs/node Conversation
Member
Make the inner loop execute fewer compare-and-branch executions per This coincidentally fixes an out-of-bounds read: Should have read: But this commit removes the offending code altogether. Fixes: #2166 R=@trevnorris? CI: https://jenkins-iojs.nodesource.com/view/iojs/job/iojs+any-pr+multi/155/
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. very minor nit. Is four spaces here, okay?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we really cast the result to
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. The alternative was to change the type of the list elements to
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I don't think we really have a convention for that but I'll change it to two spaces before landing.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
bnoordhuis
force-pushed
the
optimize-base64-decode
branch
from
7f8acb6 to
a5df468
Compare
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. Make the inner loop execute fewer compare-and-branch executions per
processed byte, resulting in a 50% or more speedup.
This coincidentally fixes an out-of-bounds read:
while (unbase64(*src) < 0 && src < srcEnd)
Should have read:
while (src < srcEnd && unbase64(*src) < 0)
But this commit removes the offending code altogether.
Fixes: nodejs#2166
PR-URL: nodejs#2193
Reviewed-By: Trevor Norris <[email protected]>
parallel/test-buffer called `Buffer.prototype.toString()` on a buffer with uninitialized memory. Call `Buffer.prototype.fill()` on it first. PR-URL: nodejs#2193 Reviewed-By: Trevor Norris <[email protected]>
bnoordhuis
force-pushed
the
optimize-base64-decode
branch
from
a5df468 to
ac70bc8
Compare
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This was referenced
3 tasks done
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
c++
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Invalid read in node::base64_decode<char>(char*, unsigned long, char const*, unsigned long)Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | ||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |