@@ -118,21 +118,6 @@ core.NullDereference (C, C++, ObjC)
118118"""""""""""""""""""""""""""""""""""
119119Check for dereferences of null pointers.
120120
121- This checker specifically does
122- not report null pointer dereferences for x86 and x86-64 targets when the
123- address space is 256 (x86 GS Segment), 257 (x86 FS Segment), or 258 (x86 SS
124- segment). See `X86/X86-64 Language Extensions
125- <https://clang.llvm.org/docs/LanguageExtensions.html#memory-references-to-specified-segments> `__
126- for reference.
127-
128- The ``SuppressAddressSpaces `` option suppresses
129- warnings for null dereferences of all pointers with address spaces. You can
130- disable this behavior with the option
131- ``-analyzer-config core.NullDereference:SuppressAddressSpaces=false ``.
132- Value of this option is also used for checker
133- :ref: `_alpha-core-FixedAddressDereference `.
134- *Defaults to true *.
135-
136121.. code-block :: objc
137122
138123 // C
@@ -172,6 +157,16 @@ Value of this option is also used for checker
172157 obj->x = 1; // warn
173158 }
174159
160+ Null pointer dereferences of pointers with address spaces are not always defined
161+ as error. Specifically on x86/x86-64 target if the pointer address space is
162+ 256 (x86 GS Segment), 257 (x86 FS Segment), or 258 (x86 SS Segment), a null
163+ dereference is not defined as error. See `X86/X86-64 Language Extensions
164+ <https:// clang.llvm.org/docs/LanguageExtensions.html#memory-references-to-specified-segments>`__
165+ for reference. The ``suppress-all-address-spaces`` configuration option can be
166+ used to control if null dereferences with any address space or only with the
167+ specific x86 address spaces 256, 257, 258 are excluded from reporting as error.
168+ The default is all address spaces.
169+
175170.. _core-StackAddressEscape:
176171
177172core.StackAddressEscape (C)
@@ -2926,6 +2921,9 @@ Check for assignment of a fixed address to a pointer.
29262921alpha.core .FixedAddressDereference (C, C++, ObjC)
29272922"""""""""""""""""""""""""""""""""""""""""""""""""
29282923Check for dereferences of fixed addresses.
2924+ A pointer contains a fixed address if it was set to a hard-coded value or it
2925+ becomes otherwise obvious that at that point it can have only a single specific
2926+ value.
29292927
29302928.. code-block :: c
29312929
@@ -2945,17 +2943,10 @@ Check for dereferences of fixed addresses.
29452943 int x = (*p_function)('x', 'y'); // NO warning yet at functon pointer calls
29462944 }
29472945
2948- Similarly to :ref: `_core-NullDereference `, the checker intentionally does
2949- not report dereferences for x86 and x86-64 targets when the
2950- address space is 256 (x86 GS Segment), 257 (x86 FS Segment), or 258 (x86 SS
2951- Segment). (See `X86/X86-64 Language Extensions
2952- <https://clang.llvm.org/docs/LanguageExtensions.html#memory-references-to-specified-segments> `__
2953- for reference.)
2954-
2955- If you want to disable this behavior, set the ``SuppressAddressSpaces `` option
2956- of checker ``core.NullDereference `` to false, like
2957- ``-analyzer-config core.NullDereference:SuppressAddressSpaces=false ``. The value
2958- of this option is used for both checkers.
2946+ The analyzer option ``suppress-all-address-spaces `` affects this checker. If it
2947+ is set to true pointer dereferences with any address space are not reported as
2948+ error. Otherwise only address spaces 256, 257, 258 on target x86/x86-64 are
2949+ excluded from reporting as error. The default is all address spaces.
29592950
29602951.. _alpha-core-PointerArithm :
29612952
0 commit comments