Skip to content
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

quic: always copy stateless reset token #33917

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
Member

Take ownership of the token value, since the memory for it is allocated
anyway and the buffer size is just 16, i.e. copyable very cheaply.

This makes valgrind stop complaining about a use-after-free error
when running sequential/test-quic-preferred-address-ipv6.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Take ownership of the token value, since the memory for it is allocated
anyway and the buffer size is just 16, i.e. copyable very cheaply.

This makes valgrind stop complaining about a use-after-free error
when running `sequential/test-quic-preferred-address-ipv6`.
@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Jun 16, 2020
@addaleax addaleax added the quic Issues and PRs related to the QUIC implementation / HTTP/3. label Jun 16, 2020
@jasnell
Copy link
Member

jasnell commented Jun 17, 2020

CI: https://ci.nodejs.org/job/node-test-commit/39060/

test-quic-preferred-address-ipv6 failed on multiple systems in #33912, it's possible this fixes it, but I also think we need to skip ipv6 on some of the systems -- #33919

@jasnell
Copy link
Member

jasnell commented Jun 17, 2020

Not all of the quic tests will pass on all platforms yet

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@jasnell jasnell added the fast-track PRs that do not need to wait for 48 hours to land. label Jun 17, 2020
@jasnell
Copy link
Member

jasnell commented Jun 17, 2020

@nodejs/quic ... fast track?

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

jasnell pushed a commit that referenced this pull request Jun 17, 2020
Take ownership of the token value, since the memory for it is allocated
anyway and the buffer size is just 16, i.e. copyable very cheaply.

This makes valgrind stop complaining about a use-after-free error
when running `sequential/test-quic-preferred-address-ipv6`.

PR-URL: #33917
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@jasnell
Copy link
Member

jasnell commented Jun 17, 2020

Landed in 133a97f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. fast-track PRs that do not need to wait for 48 hours to land. quic Issues and PRs related to the QUIC implementation / HTTP/3.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants