diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/AddressSanitizer.rst | 9 | ||||
-rw-r--r-- | docs/UsersManual.rst | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/docs/AddressSanitizer.rst b/docs/AddressSanitizer.rst index ad30d0ae6a..57cb4fe7c8 100644 --- a/docs/AddressSanitizer.rst +++ b/docs/AddressSanitizer.rst @@ -117,6 +117,15 @@ supported by other compilers, so we suggest to use it together with ``__has_feature(address_sanitizer)``. Note: currently, this attribute will be lost if the function is inlined. +``Initialization order checking`` +--------------------------------- + +AddressSanitizer can optionally detect dynamic initialization order problems, +when initialization of globals defined in one translation unit uses +globals defined in another translation unit. To enable this check at runtime, +you should set environment variable +``ASAN_OPTIONS=check_initialization_order=1``. + Supported Platforms =================== diff --git a/docs/UsersManual.rst b/docs/UsersManual.rst index 281cc20653..6cc836130f 100644 --- a/docs/UsersManual.rst +++ b/docs/UsersManual.rst @@ -842,6 +842,8 @@ are listed below. ``-fsanitize=address``: :doc:`AddressSanitizer`, a memory error detector. + - ``-fsanitize=init-order``: Make AddressSanitizer check for + dynamic initialization order problems. Implied by ``-fsanitize=address``. - ``-fsanitize=address-full``: AddressSanitizer with all the experimental features listed below. - ``-fsanitize=integer``: Enables checks for undefined or @@ -917,8 +919,6 @@ are listed below. Experimental features of AddressSanitizer (not ready for widespread use, require explicit ``-fsanitize=address``): - - ``-fsanitize=init-order``: Check for dynamic initialization order - problems. - ``-fsanitize=use-after-return``: Check for use-after-return errors (accessing local variable after the function exit). - ``-fsanitize=use-after-scope``: Check for use-after-scope errors |