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

test: fix broken env fuzzer by initializing process #51080

Merged
merged 1 commit into from
May 12, 2024

Conversation

AdamKorcz
Copy link
Contributor

Fixes a broken fuzzer.

It looks like the fuzzer is leaking memory, but it is so slow that it is hard to tell. Once the fuzzer starts running on OSS-Fuzz again, we should get good feedback. If it has a leak, then I plan to fix it over the next couple of weeks; If anyone can spot a possible leak without running it, it would be a great help.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Dec 6, 2023
@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 7, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 7, 2023
@nodejs-github-bot
Copy link
Collaborator

@AdamKorcz AdamKorcz closed this Dec 7, 2023
@AdamKorcz AdamKorcz reopened this Dec 7, 2023
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

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

LGTM though I do wonder why this is not using node::InitializeOncePerProcess() instead..

@joyeecheung joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 15, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 15, 2023
@nodejs-github-bot
Copy link
Collaborator

@joyeecheung
Copy link
Member

joyeecheung commented Dec 15, 2023

It looks like the fuzzer is leaking memory, but it is so slow that it is hard to tell.

Actually I just noticed that it seems the fuzzers aren't tearing down the platform etc. properly. See

void NodeTestEnvironment::TearDown() {
cppgc::ShutdownProcess();
v8::V8::Dispose();
v8::V8::DisposePlatform();
NodeZeroIsolateTestFixture::platform->Shutdown();
NodeZeroIsolateTestFixture::platform.reset(nullptr);
NodeZeroIsolateTestFixture::tracing_agent.reset(nullptr);
}
for an example

@AdamKorcz
Copy link
Contributor Author

It looks like the fuzzer is leaking memory, but it is so slow that it is hard to tell.

Actually I just noticed that it seems the fuzzers aren't tearing down the platform etc. properly. See

void NodeTestEnvironment::TearDown() {
cppgc::ShutdownProcess();
v8::V8::Dispose();
v8::V8::DisposePlatform();
NodeZeroIsolateTestFixture::platform->Shutdown();
NodeZeroIsolateTestFixture::platform.reset(nullptr);
NodeZeroIsolateTestFixture::tracing_agent.reset(nullptr);
}

for an example

Thank you for the feedback. I will test this and make a follow-up PR.

Signed-off-by: Adam Korczynski <adam@adalogics.com>
@aduh95 aduh95 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 11, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 merged commit d9b61db into nodejs:main May 12, 2024
53 checks passed
@aduh95
Copy link
Contributor

aduh95 commented May 12, 2024

Landed in d9b61db

targos pushed a commit that referenced this pull request May 12, 2024
Signed-off-by: Adam Korczynski <adam@adalogics.com>
PR-URL: #51080
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
lukins-cz pushed a commit to lukins-cz/OS-Aplet-node that referenced this pull request Jun 1, 2024
Signed-off-by: Adam Korczynski <adam@adalogics.com>
PR-URL: nodejs#51080
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants