From 510c9192493b6af5c4c70b14390fe340bca8ecaa Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Fri, 7 Jun 2019 14:13:13 +0200 Subject: Enable sanitization for hash tables. 2019-06-07 Martin Liska * 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 --- gcc/cselib.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gcc/cselib.c') diff --git a/gcc/cselib.c b/gcc/cselib.c index 84c17c2..a1cbdec 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 (31); + /* FIXME: enable sanitization (PR87845) */ + cselib_hash_table + = new hash_table (31, /* ggc */ false, + /* sanitize_eq_and_hash */ false); if (cselib_preserve_constants) - cselib_preserved_hash_table = new hash_table (31); + cselib_preserved_hash_table + = new hash_table (31, /* ggc */ false, + /* sanitize_eq_and_hash */ false); next_uid = 1; } -- cgit v1.1