[PATCH] D62875: [GWP-ASan] Add public-facing documentation [6].

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 16:48:34 PDT 2019


hctim marked an inline comment as done.
hctim added inline comments.


================
Comment at: llvm/docs/GwpAsan.rst:138
+  ``-GWP_ASAN_DEFAULT_OPTIONS="..."`` when building
+  ``optional/options_parser.cpp``).
+
----------------
vlad.tsyrklevich wrote:
> hctim wrote:
> > morehouse wrote:
> > > hctim wrote:
> > > > morehouse wrote:
> > > > > Do we expect/want-to-support building outside of compiler-rt?  If we encourage this, we may end up with many forks of GWP-ASan.
> > > > I think that supporting out-of-RT builds is necessary. We've got an Android repository slice up and going that will definitely be out-of-tree builds.
> > > > 
> > > > My goal is basically to have the core `**/*.h` and `**/*.cpp`. If you want to use GWP-ASan, simply pull in the slice of the repository and add it to your build.
> > > > 
> > > > Maybe I should copybara slice this out of CRT and keep a makefile-independent (read: only cpp and header files) version so that it can be mirrored everywhere... WDYT?
> > > Not sure if we have a need/demand for this.  I'm inclined to not do this unless we have a good reason.
> > I forsee Chrome on Android using this configuration method to start-time disable platform GWP-ASan, as they'll use their own variant.
> > 
> > @vlad.tsyrklevich, do you have any thoughts?
> We probably do want to disable GWP-ASan for Android Chrome, though it doesn't have to be this method specifically.
Ways to configure:
- Compile time (for GWP-ASan) configuration options: Use `-DGWP_ASAN_OPTIONS` as described above.
- Compile time (for application) configuration options: Use `__gwp_asan_default_options` here.
- Program start time: Use `GWP_ASAN_OPTIONS` environment as per below.

We could possibly do detection of Chrome in the initialisation of platform GWP-ASan on Android - but I don't think this is generally suitable. 

@morehouse are you okay with providing this config option? I think that #2 is probably the best way for applications to "always off" GWP-ASan, unless we have a better solution in mind.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62875/new/

https://reviews.llvm.org/D62875





More information about the llvm-commits mailing list