-
Notifications
You must be signed in to change notification settings - Fork 10
deps: avoid using unset values in cpu profiler #233
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
deps: avoid using unset values in cpu profiler #233
Conversation
`lineNumber`, `columnNumber` and `url` node fields can be actually undefined. Make sure we avoid integer overflows and potential crashes. As an example, if `lineNumber` or `columnNumber` are undefined, they were taking the `4294967295` which obviously doesn't make any sense.
juanarbol
left a comment
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.
sgtm, could you please open the backports for 20.x and 18.x?
| writer_->AddNumber(node->GetLineNumber() - 1); | ||
| writer_->AddString(",\"columnNumber\":"); | ||
| writer_->AddNumber(node->GetColumnNumber() - 1); | ||
| if (node->GetLineNumber()) { |
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.
Have you checked what GetLineNumber() returns in case of REPL? (the same applies to GetColumnNumber)
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.
This is an example of what it prints:
"callFrame":{"functionName":"","lineNumber":0,"columnNumber":12,"scriptId":162,"url":"REPL6"}
`lineNumber`, `columnNumber` and `url` node fields can be actually undefined. Make sure we avoid integer overflows and potential crashes. As an example, if `lineNumber` or `columnNumber` are undefined, they were taking the `4294967295` which obviously doesn't make any sense. PR-URL: #233 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
|
Landed in a4dfbf6 |
`lineNumber`, `columnNumber` and `url` node fields can be actually undefined. Make sure we avoid integer overflows and potential crashes. As an example, if `lineNumber` or `columnNumber` are undefined, they were taking the `4294967295` which obviously doesn't make any sense. PR-URL: #233 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
`lineNumber`, `columnNumber` and `url` node fields can be actually undefined. Make sure we avoid integer overflows and potential crashes. As an example, if `lineNumber` or `columnNumber` are undefined, they were taking the `4294967295` which obviously doesn't make any sense. PR-URL: #233 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
`lineNumber`, `columnNumber` and `url` node fields can be actually undefined. Make sure we avoid integer overflows and potential crashes. As an example, if `lineNumber` or `columnNumber` are undefined, they were taking the `4294967295` which obviously doesn't make any sense. PR-URL: #233 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> PR-URL: #245 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
`lineNumber`, `columnNumber` and `url` node fields can be actually undefined. Make sure we avoid integer overflows and potential crashes. As an example, if `lineNumber` or `columnNumber` are undefined, they were taking the `4294967295` which obviously doesn't make any sense. PR-URL: #233 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> PR-URL: #246 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
lineNumber,columnNumberandurlnode fields can be actually undefined. Make sure we avoid integer overflows and potential crashes.As an example, if
lineNumberorcolumnNumberare undefined, they were taking the4294967295which obviously doesn't make any sense.