From: Martin Liska Date: Tue, 11 Jun 2019 07:55:19 +0000 (+0200) Subject: Disable htable sanitization in pt.c (PR c++/87847). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3f2cf0365782a0d5acf637b7513dd333af43ea05;p=gcc.git Disable htable sanitization in pt.c (PR c++/87847). 2019-06-11 Martin Liska PR c++/87847 * hash-table.h: Extend create_gcc, add one parameter that is passed into hash_table::hash_table. 2019-06-11 Martin Liska PR c++/87847 * pt.c (init_template_processing): Disable hash table sanitization for decl_specializations and type_specializations. From-SVN: r272144 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a4796446a5b..8350a6fc163 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-06-11 Martin Liska + + PR c++/87847 + * hash-table.h: Extend create_gcc, add one parameter + that is passed into hash_table::hash_table. + 2019-06-10 Uroš Bizjak * config/i386/i386-protos.h (ix86_split_fp_absneg_operator): diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 084e6239bcd..f279c7cdd28 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2019-06-11 Martin Liska + + PR c++/87847 + * pt.c (init_template_processing): Disable hash table + sanitization for decl_specializations and type_specializations. + 2019-06-10 Jason Merrill * constexpr.c (free_constructor): New. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index ebaab27f09c..2a626526c6f 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -28316,8 +28316,9 @@ declare_integer_pack (void) void init_template_processing (void) { - decl_specializations = hash_table::create_ggc (37); - type_specializations = hash_table::create_ggc (37); + /* FIXME: enable sanitization (PR87847) */ + decl_specializations = hash_table::create_ggc (37, false); + type_specializations = hash_table::create_ggc (37, false); if (cxx_dialect >= cxx11) declare_integer_pack (); diff --git a/gcc/hash-table.h b/gcc/hash-table.h index 6c1fca3459b..4f5e150a0ac 100644 --- a/gcc/hash-table.h +++ b/gcc/hash-table.h @@ -386,10 +386,10 @@ public: /* Create a hash_table in gc memory. */ static hash_table * - create_ggc (size_t n CXX_MEM_STAT_INFO) + create_ggc (size_t n, bool sanitize_eq_and_hash = true CXX_MEM_STAT_INFO) { hash_table *table = ggc_alloc (); - new (table) hash_table (n, true, true, GATHER_STATISTICS, + new (table) hash_table (n, true, sanitize_eq_and_hash, GATHER_STATISTICS, HASH_TABLE_ORIGIN PASS_MEM_STAT); return table; }