GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: add ASAN build instructions by gengjiawen · Pull Request #32436 · nodejs/node

Conversation

@gengjiawen

@gengjiawen gengjiawen commented Mar 23, 2020

Copy link
Copy Markdown
Member
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to Node.js builds or CI infrastructure. doc Issues and PRs related to Node.js documentation. labels Mar 23, 2020
@gengjiawen
gengjiawen requested review from gabrielschulhof and mmarchini March 23, 2020 12:08
@mmarchini

mmarchini commented Mar 23, 2020

Copy link
Copy Markdown
Contributor

A few suggestions:

  1. Instead of suggesting to build on docker Windows and Mac, we should make sure our config works on those operating systems. Especially on Mac using docker can be really slow since it runs on a VM (well, it also runs on a VM on Windows, but with HyperV it's a bit faster). Not only that, if we use docker we'll never have ASAN checking Windows and Mac specific code paths
  2. Also add instructions to build with clang
  3. --debug is not required. We can suggest debug build in the paragraph and explain why it's useful, but the first example command shouldn't have it because it's a lot slower to build and to run tests
  4. --ninja is not our official build tool and is not required for ASAN, therefore it shouldn't be here as well (folks who prefer Ninja probably already know the option exist). Maybe mention that building with ninja also works
  5. With the suggestions above we can use make test-only instead of executing the tests manually. Calling tools/test.py will miss cctest for example, so it's better to keep it simple and follow our current build workflow
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell reviewed Mar 23, 2020
View reviewed changes
Comment thread BUILDING.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell reviewed Mar 23, 2020
View reviewed changes
Comment thread BUILDING.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell reviewed Mar 23, 2020
View reviewed changes
Comment thread BUILDING.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@gengjiawen

gengjiawen commented Mar 24, 2020

Copy link
Copy Markdown
Member Author

Instead of suggesting to build on docker Windows and Mac, we should make sure our config works on those operating systems.

On windows ASAN only support cmake IIRC. macOS is also broken for our repo. on Container it should cover most cases. But I agree it would be much better we check on those platforms too. So if anyone want to help with the asan issue on windows and macOS, it's the fastest way (I am using docker even on linux).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gengjiawen
gengjiawen force-pushed the doc/asan branch from ab4fa39 to 74c18aa Compare March 24, 2020 13:30
jasnell
jasnell approved these changes Mar 24, 2020
View reviewed changes
mmarchini
mmarchini reviewed Mar 24, 2020
View reviewed changes
Comment thread BUILDING.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread BUILDING.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread BUILDING.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread BUILDING.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread BUILDING.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread BUILDING.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread BUILDING.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread BUILDING.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@gengjiawen
gengjiawen force-pushed the doc/asan branch from 74c18aa to 95abca0 Compare March 26, 2020 14:11
@gengjiawen
gengjiawen requested a review from mmarchini March 26, 2020 14:11
mmarchini
mmarchini approved these changes Mar 26, 2020
View reviewed changes
Comment thread BUILDING.md Outdated

@mmarchini mmarchini Mar 26, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Missing . at the end of the sentence.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gengjiawen
gengjiawen force-pushed the doc/asan branch from 95abca0 to 36dcf3f Compare March 27, 2020 15:33
@mmarchini

mmarchini commented Mar 27, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Oh right, I almost forgot: before we land it, should we add instructions on how to build with clang (since ASAN works generally better with clang)?

$ CC=clang CXX=clang++ LINK=clang++ ./configure --debug --enable-asan 
$ CC=clang CXX=clang++ LINK=clang++ make -j4
$ CC=clang CXX=clang++ LINK=clang++ make test-only 

Or, if the user is using the docker container:

$ docker run -e CC=clang -e CXX=clang++ -e LINK=clang++ ...

(not a blocker, but I had better results with clang)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

This comment has been minimized.

Sign in to view
@addaleax

addaleax commented Mar 30, 2020

Copy link
Copy Markdown
Member

This doesn’t need a full CI run, but the commit message should start with doc:.

mmarchini reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gengjiawen

gengjiawen commented Mar 31, 2020

Copy link
Copy Markdown
Member Author

This doesn’t need a full CI run, but the commit message should start with doc:.

Should I just run this one https://ci.nodejs.org/job/node-test-linter/ ?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gengjiawen
doc: add ASAN build instructions
97d7bc0
@gengjiawen
gengjiawen force-pushed the doc/asan branch from 36dcf3f to 97d7bc0 Compare March 31, 2020 12:12
@gengjiawen gengjiawen changed the title build: add ASAN build instructions doc: add ASAN build instructions Mar 31, 2020
@mmarchini

mmarchini commented Mar 31, 2020

Copy link
Copy Markdown
Contributor

In this case just Actions is fine (since it's a doc-only change)

gengjiawen reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gengjiawen added a commit that referenced this pull request Apr 1, 2020
@gengjiawen
doc: add ASAN build instructions
9c00af0
PR-URL: #32436
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
@gengjiawen

gengjiawen commented Apr 1, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Landed in 9c00af0

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gengjiawen gengjiawen closed this Apr 1, 2020
@gengjiawen

gengjiawen commented Apr 1, 2020

Copy link
Copy Markdown
Member Author

Oh right, I almost forgot: before we land it, should we add instructions on how to build with clang (since ASAN works generally better with clang)?

$ CC=clang CXX=clang++ LINK=clang++ ./configure --debug --enable-asan 
$ CC=clang CXX=clang++ LINK=clang++ make -j4
$ CC=clang CXX=clang++ LINK=clang++ make test-only 

Or, if the user is using the docker container:

$ docker run -e CC=clang -e CXX=clang++ -e LINK=clang++ ...

(not a blocker, but I had better results with clang)

Good point, the new docker image now is set to clang by default. Also we should make that use clang in general build and mention in ASAN part clang has better output ?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gengjiawen
gengjiawen deleted the doc/asan branch April 1, 2020 02:57
BethGriggs pushed a commit that referenced this pull request Apr 7, 2020
@gengjiawen @BethGriggs
doc: add ASAN build instructions
94767b9
PR-URL: #32436
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
targos pushed a commit that referenced this pull request Apr 12, 2020
@gengjiawen @targos
doc: add ASAN build instructions
9ee2afa
PR-URL: #32436
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
@targos targos mentioned this pull request Apr 13, 2020
v13.13.0 release proposal #32813
Merged
targos pushed a commit that referenced this pull request Apr 22, 2020
@gengjiawen @targos
doc: add ASAN build instructions
959055f
PR-URL: #32436
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
@targos targos mentioned this pull request Apr 22, 2020
v12.16.3 release proposal #33009
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@gabrielschulhof gabrielschulhof Awaiting requested review from gabrielschulhof
+1 more reviewer
@mmarchini mmarchini mmarchini approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

build Issues and PRs related to Node.js builds or CI infrastructure. doc Issues and PRs related to Node.js documentation.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@gengjiawen @mmarchini @nodejs-github-bot @addaleax @jasnell
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.