c++: Enable spec_hasher table sanitization [PR87847]
authorPatrick Palka <ppalka@redhat.com>
Tue, 19 May 2020 03:50:32 +0000 (23:50 -0400)
committerPatrick Palka <ppalka@redhat.com>
Tue, 19 May 2020 03:50:32 +0000 (23:50 -0400)
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.

gcc/cp/ChangeLog:

PR c++/87847
* pt.c (init_template_processing): Enable sanitization for
decl_specializations and type_specializations.

gcc/cp/ChangeLog
gcc/cp/pt.c

index cd81891201da8489ce731b354de8550b6260adc5..70e0b186389cd0f8ce053dc82004f8cefb7728a8 100644 (file)
@@ -1,5 +1,9 @@
 2020-05-19  Patrick Palka  <ppalka@redhat.com>
 
+       PR c++/87847
+       * pt.c (init_template_processing): Enable sanitization for
+       decl_specializations and type_specializations.
+
        PR c++/66439
        * pt.c (fn_type_unification): Pass 'fn' instead of NULL_TREE as
        the 'in_decl' parameter to coerce_template_parms.
index 50933cbc23bef46a20b0852b2510c02920e00629..4d9651acee65be392a53fc004cbb9cb94c0ed88d 100644 (file)
@@ -29330,9 +29330,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 ();