From: Jose Ruiz Date: Wed, 16 Apr 2025 14:16:14 +0000 (+0200) Subject: ada: Document sanitizers for Ada X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66ef410fa3a36bcf95785c7794b1a18687de245b;p=thirdparty%2Fgcc.git ada: Document sanitizers for Ada gcc/ada/ChangeLog: * doc/gnat_ugn/gnat_and_program_execution.rst: Add the documentation about using sanitizers with Ada code. * gnat_ugn.texi: Regenerate. --- diff --git a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst b/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst index ab49e12e794..0184bd4aaf8 100644 --- a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst +++ b/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst @@ -4200,7 +4200,8 @@ It can detect the following types of problems: Ada’s ``Index_Check`` detects buffer overflows caused by out-of-bounds array access. If run-time checks are disabled, the sanitizer can still detect such overflows at execution time the same way as it signalled the previous wrong - memory overlay. + memory overlay. Note that if both the Ada run-time checks and the sanitizer + are enabled, the Ada run-time exception takes precedence. .. code-block:: ada diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 170384b505f..2bad9b858b8 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -22971,7 +22971,8 @@ Buffer overflow Ada’s @code{Index_Check} detects buffer overflows caused by out-of-bounds array access. If run-time checks are disabled, the sanitizer can still detect such overflows at execution time the same way as it signalled the previous wrong -memory overlay. +memory overlay. Note that if both the Ada run-time checks and the sanitizer +are enabled, the Ada run-time exception takes precedence. @quotation