diff options
author | Martin Liska <mliska@suse.cz> | 2019-06-07 14:13:13 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2019-06-07 12:13:13 +0000 |
commit | 510c9192493b6af5c4c70b14390fe340bca8ecaa (patch) | |
tree | c2e8bab0a5b755fef04328d8776654af5bc76f67 /gcc/cselib.c | |
parent | 686a56a85d39750cd5c0c42f2ea747c8632e519e (diff) |
Enable sanitization for hash tables.
2019-06-07 Martin Liska <mliska@suse.cz>
* cselib.c (cselib_init): Disable hash table
sanitization.
* hash-set.h: Pass new default argument to m_table.
* hash-table.c: Add global variable with hash table
sanitization limit.
* hash-table.h (Allocator>::hash_table): Add new argument
to ctor.
(hashtab_chk_error): New.
* params.def (PARAM_HASH_TABLE_VERIFICATION_LIMIT): New.
* toplev.c (process_options): Set hash_table_sanitize_eq_limit
from the PARAM_HASH_TABLE_VERIFICATION_LIMIT value.
From-SVN: r272038
Diffstat (limited to 'gcc/cselib.c')
-rw-r--r-- | gcc/cselib.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/cselib.c b/gcc/cselib.c index 84c17c23f6d..a1cbdec9718 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -2858,9 +2858,14 @@ cselib_init (int record_what) } used_regs = XNEWVEC (unsigned int, cselib_nregs); n_used_regs = 0; - cselib_hash_table = new hash_table<cselib_hasher> (31); + /* FIXME: enable sanitization (PR87845) */ + cselib_hash_table + = new hash_table<cselib_hasher> (31, /* ggc */ false, + /* sanitize_eq_and_hash */ false); if (cselib_preserve_constants) - cselib_preserved_hash_table = new hash_table<cselib_hasher> (31); + cselib_preserved_hash_table + = new hash_table<cselib_hasher> (31, /* ggc */ false, + /* sanitize_eq_and_hash */ false); next_uid = 1; } |