From: Jose Ruiz <r...@adacore.com>

gcc/ada/ChangeLog:

        * doc/gnat_ugn/gnat_and_program_execution.rst: Add the
        documentation about using sanitizers with Ada code.
        * gnat_ugn.texi: Regenerate.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 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 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
 
-- 
2.43.0

Reply via email to