[PATCH] c++: Enable spec_hasher table sanitization [PR87847]
Jason Merrill
jason@redhat.com
Mon May 18 20:57:04 GMT 2020
On 5/11/20 9:10 AM, Patrick Palka wrote:
> It looks like hash table sanitization is now safe to enable for the
> decl_specializations and type_specializations tables, probably ever
> since PR94454 was fixed.
>
> Bootstrapped and regtested on x86_64-pc-linux-gnu with the attached
> debugging patch that makes all entries hash to 0, and also successfully
> built the range-v3 testsuite and a number of other libraries with this
> debugging patch. Does this look OK to commit?
OK.
> gcc/cp/ChangeLog:
>
> PR c++/87847
> * pt.c (init_template_processing): Enable sanitization for
> decl_specializations and type_specializations.
> ---
> gcc/cp/pt.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
> index c6091127225..2d1869816c5 100644
> --- a/gcc/cp/pt.c
> +++ b/gcc/cp/pt.c
> @@ -29441,9 +29441,8 @@ declare_integer_pack (void)
> void
> init_template_processing (void)
> {
> - /* FIXME: enable sanitization (PR87847) */
> - decl_specializations = hash_table<spec_hasher>::create_ggc (37, false);
> - type_specializations = hash_table<spec_hasher>::create_ggc (37, false);
> + decl_specializations = hash_table<spec_hasher>::create_ggc (37);
> + type_specializations = hash_table<spec_hasher>::create_ggc (37);
>
> if (cxx_dialect >= cxx11)
> declare_integer_pack ();
>
More information about the Gcc-patches
mailing list