Skip to content

Tracking Issue: enable sanitizers on our CI #32380

Open
@mmarchini

Description

@mmarchini

What are sanitizers?

Sanitizers are build options which can be used to identify programming errors in C++. They add overhead to the program, which is why it's not recommended to use in releases, but they can be valuable to find memory leaks and other potential crashes on our tests. V8 has ASAN buildbots which run on every CL, and they are working on making their code base UBSan compatible as well.

Cool, what do we need to make it happen?

Well, first thing, asan has to work on Node.js. We have --enable-asan on configure today, and the build will work on most computers (it requires a considerable amount of memory). But most of our tests will fail with it, because our code base is not ASAN clean. We might be also missing some ASAN flags: looking at V8 source code and build dependencies, they do one thing or two different.

There's also the memory issue: as of right now, we need a big machine to build with ASAN. GitHub Actions can't run an ASAN build because it "only" has 7Gb. Hopefully there's something we can tune in the build to use less memory. Otherwise, we'll need a custom machine for it (probably on Jenkins).

As for other sanitizers (like UBSan), upstream projects need to support those first, so we are blocked for now.

To Do List (ASAN)

  • Investigate huge memory consumption during build
  • Move gengjiawen/node-build to nodejs/ org
    • Move repository
    • Move Docker build to Node.js Docker hub
  • Enable build on our CI (no tests)
    • This will ensure we don't break the build moving forward
  • Fix failing tests
    • Once everything is working, enable tests on our CI
  • Fix ASAN flags for OS X
  • Fix ASASN flags for Windows

To Do List (UBSan)

  • Wait for V8 to be UBSan compatible (v8:3770)
    • Enable build on our CI (no tests)
      • This will ensure we don't break the build moving forward
    • Fix failing tests
      • Once everything is working, enable tests on our CI

We can list current failing tests here once we get rid of the most noisy ones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    memoryIssues and PRs related to the memory management or memory footprint.metaIssues and PRs related to the general management of the project.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions