File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ file a new issue.
28
28
* [ Running Coverage] ( #running-coverage )
29
29
* [ Building the documentation] ( #building-the-documentation )
30
30
* [ Building a debug build] ( #building-a-debug-build )
31
+ * [ Building an ASAN build] ( #building-an-asan-build )
31
32
* [ Troubleshooting Unix and macOS builds] ( #troubleshooting-unix-and-macos-builds )
32
33
* [ Windows] ( #windows )
33
34
* [ Prerequisites] ( #prerequisites )
@@ -491,6 +492,22 @@ $ gdb /opt/node-debug/node core.node.8.1535359906
491
492
$ backtrace
492
493
```
493
494
495
+ #### Building an ASAN build
496
+
497
+ [ ASAN] ( https://github.com/google/sanitizers ) can help detect various memory
498
+ related bugs. ASAN builds are currently only supported on linux.
499
+ If you want to check it on Windows or macOS or you want a consistent toolchain
500
+ on Linux, you can try [ Docker] ( https://www.docker.com/products/docker-desktop )
501
+ (using an image like ` gengjiawen/node-build:2020-02-14 ` ).
502
+
503
+ The ` --debug ` is not necessary and will slow down build and testing, but it can
504
+ show clear stacktrace if ASAN hits an issue.
505
+
506
+ ``` console
507
+ $ ./configure --debug --enable-asan && make -j4
508
+ $ make test-only
509
+ ```
510
+
494
511
#### Troubleshooting Unix and macOS builds
495
512
496
513
Stale builds can sometimes result in ` file not found ` errors while building.
You can’t perform that action at this time.
0 commit comments