diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2024-05-27 16:46:03 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2024-06-21 10:34:23 +0200 |
commit | 2b510ac3aa521c6984495c63547914f271f1f51c (patch) | |
tree | c0824a3b35c487868fde29f83987a16281395c4d /libcpp | |
parent | d69c53f73dae181c79f6ec6c7276a172476a2728 (diff) | |
download | gcc-2b510ac3aa521c6984495c63547914f271f1f51c.zip gcc-2b510ac3aa521c6984495c63547914f271f1f51c.tar.gz gcc-2b510ac3aa521c6984495c63547914f271f1f51c.tar.bz2 |
ada: Fix bogus Address Sanitizer stack-buffer-overflow on packed array copy
The Address Sanitizer considers that the padding at the end of a justified
modular type may be accessed through the object, but it is never accessed
and therefore can always be reused.
gcc/ada/
* gcc-interface/decl.cc (gnat_to_gnu_entity) <discrete_type>: Set
the TYPE_JUSTIFIED_MODULAR_P flag earlier.
* gcc-interface/misc.cc (gnat_unit_size_without_reusable_padding):
New function.
(LANG_HOOKS_UNIT_SIZE_WITHOUT_REUSABLE_PADDING): Redefine to above
function.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions