[PATCH] c++: Enable spec_hasher table sanitization [PR87847]
Patrick Palka
ppalka@redhat.com
Mon May 11 13:10:45 GMT 2020
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?
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 ();
--
2.26.2.561.g07d8ea56f2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Verify-equal-spec_hasher-entries-have-equal-hashes.patch
Type: text/x-diff
Size: 4383 bytes
Desc:
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200511/77abf20f/attachment-0001.bin>
More information about the Gcc-patches
mailing list