deps: avoid using unset values in cpu profiler#233
Closed
santigimeno wants to merge 1 commit intonode-v22.x-nsolid-v5.xfrom
Closed
deps: avoid using unset values in cpu profiler#233santigimeno wants to merge 1 commit intonode-v22.x-nsolid-v5.xfrom
santigimeno wants to merge 1 commit intonode-v22.x-nsolid-v5.xfrom
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
approved these changes
Dec 9, 2024
Contributor
juanarbol
left a comment
There was a problem hiding this comment.
sgtm, could you please open the backports for 20.x and 18.x?
RafaelGSS
reviewed
Dec 9, 2024
| writer_->AddNumber(node->GetLineNumber() - 1); | ||
| writer_->AddString(",\"columnNumber\":"); | ||
| writer_->AddNumber(node->GetColumnNumber() - 1); | ||
| if (node->GetLineNumber()) { |
Member
There was a problem hiding this comment.
Have you checked what GetLineNumber() returns in case of REPL? (the same applies to GetColumnNumber)
Member
Author
There was a problem hiding this comment.
This is an example of what it prints:
"callFrame":{"functionName":"","lineNumber":0,"columnNumber":12,"scriptId":162,"url":"REPL6"}
santigimeno
added a commit
that referenced
this pull request
Dec 16, 2024
`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>
Member
Author
|
Landed in a4dfbf6 |
santigimeno
added a commit
that referenced
this pull request
Jan 3, 2025
`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>
santigimeno
added a commit
that referenced
this pull request
Jan 9, 2025
`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>
santigimeno
added a commit
that referenced
this pull request
Jan 13, 2025
`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>
santigimeno
added a commit
that referenced
this pull request
Jan 13, 2025
`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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.