-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
double execution with THROW_AND_RETURN_IF_OOB #41935
Copy link
Copy link
Closed
Labels
bufferIssues and PRs related to the buffer subsystem.Issues and PRs related to the buffer subsystem.c++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.
Metadata
Metadata
Assignees
Labels
bufferIssues and PRs related to the buffer subsystem.Issues and PRs related to the buffer subsystem.c++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Version
16.13.2
Platform
Microsoft Windows NT 10.0.19042.0 x64
Subsystem
No response
What steps will reproduce the bug?
In file
node_buffer.cc, macroTHROW_AND_RETURN_IF_OOBis called with a function as argument :This macro is replaced with this code :
The
ParseArrayIndexfunction will be called twice which will generate performance losses.How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
No response
What do you see instead?
Each macro call of
THROW_AND_RETURN_IF_OOBmacro should be checked.Additional information
No response