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

src: asan build fix for clang #29383

Closed
wants to merge 1 commit into from
Closed

src: asan build fix for clang #29383

wants to merge 1 commit into from

Conversation

devnexen
Copy link
Contributor

adding missing header for the leak check.

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. process Issues and PRs related to the process subsystem. labels Aug 31, 2019
Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

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

LGTM. A note on the commit log:

adding missing header for the leak check.

We (usually) use present tense and (always) capitalize: s/adding/Add/

I'd probably also s/leak check/leak checker/, s/leak check/leak sanitizer/ or just s/the leak check/LSAN/.

@gengjiawen
Copy link
Member

A little off the topic, how do I enable asan when building Node.js ?

@nodejs-github-bot
Copy link
Collaborator

@devnexen
Copy link
Contributor Author

devnexen commented Sep 1, 2019

A little off the topic, how do I enable asan when building Node.js ?

./configure --help should give you the answer.

@nodejs-github-bot
Copy link
Collaborator

@gengjiawen
Copy link
Member

@nodejs/build Is it possible to add a job to test asan build works and prevent future regression ?

@bnoordhuis
Copy link
Member

I'm part of the Build WG these days so I suppose I can answer that. ^^

It's certainly possible to add a linux+asan job (this PR is about lsan though) but running the test suite is out of the question - sanitizers cause a 20-200x slowdown.

That makes it less useful because the point of course is to catch runtime misbehavior. Maybe we could run a subset of tests but I don't immediately have good suggestions on what subset that should be.

TBD whether to build with clang, gcc or both. Can you open a nodejs/build issue if you still think it's a good idea?

@gengjiawen
Copy link
Member

I'm part of the Build WG these days so I suppose I can answer that. ^^

It's certainly possible to add a linux+asan job (this PR is about lsan though) but running the test suite is out of the question - sanitizers cause a 20-200x slowdown.

That makes it less useful because the point of course is to catch runtime misbehavior. Maybe we could run a subset of tests but I don't immediately have good suggestions on what subset that should be.

TBD whether to build with clang, gcc or both. Can you open a nodejs/build issue if you still think it's a good idea?

nodejs/build#1906

@devnexen
Copy link
Contributor Author

devnexen commented Sep 2, 2019

That makes it less useful because the point of course is to catch runtime misbehavior. Maybe we could run a subset of tests but I don't immediately have good suggestions on what subset that should be.

An additional suggestion would be to use a subset of asan checks via ASAN_OPTIONS environment variable.

Add missing header for LSAN.
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

Trott pushed a commit that referenced this pull request Sep 26, 2019
Add missing header for LSAN.

PR-URL: #29383
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@Trott
Copy link
Member

Trott commented Sep 26, 2019

Landed in 4d2856e

@Trott Trott closed this Sep 26, 2019
targos pushed a commit that referenced this pull request Oct 1, 2019
Add missing header for LSAN.

PR-URL: #29383
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
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++. process Issues and PRs related to the process subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants