https://gcc.gnu.org/g:66ef410fa3a36bcf95785c7794b1a18687de245b

commit r16-1789-g66ef410fa3a36bcf95785c7794b1a18687de245b
Author: Jose Ruiz <r...@adacore.com>
Date:   Wed Apr 16 16:16:14 2025 +0200

    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:
---
 gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst | 3 ++-
 gcc/ada/gnat_ugn.texi                               | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

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 ab49e12e7949..0184bd4aaf87 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 170384b505ff..2bad9b858b8b 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

Reply via email to