=?utf-8?q?Balázs_Kéri?= <balazs.k...@ericsson.com> Message-ID: In-Reply-To: <llvm.org/llvm/llvm-project/pull/127...@github.com>
================ @@ -2919,6 +2921,42 @@ Check for assignment of a fixed address to a pointer. p = (int *) 0x10000; // warn } +.. _alpha-core-FixedAddressDereference: + +alpha.core.FixedAddressDereference (C, C++, ObjC) +""""""""""""""""""""""""""""""""""""""""""""""""" +Check for dereferences of fixed values used as pointers. + +Similarly as at :ref:`_core-NullDereference`, the checker specifically does +not report dereferences for x86 and x86-64 targets when the +address space is 256 (x86 GS Segment), 257 (x86 FS Segment), or 258 (x86 SS +segment). (See `X86/X86-64 Language Extensions +<https://clang.llvm.org/docs/LanguageExtensions.html#memory-references-to-specified-segments>`__ +for reference.) + +If you want to disable this behavior, set the ``SuppressAddressSpaces`` option +of checker ``core.NullDereference`` to false, like +``-analyzer-config core.NullDereference:SuppressAddressSpaces=false``. The value +of this option is used for both checkers. ---------------- steakhal wrote: This part of the doc feels less relevant than an example. I'd rather move this after the examples, as this fine-tunes the behavior. https://github.com/llvm/llvm-project/pull/127191 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits