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/toplev.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/toplev.c')
-rw-r--r-- | gcc/toplev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index d300ac2ec89..116be7be395 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1799,6 +1799,10 @@ process_options (void) optimization_default_node = build_optimization_node (&global_options); optimization_current_node = optimization_default_node; + if (flag_checking >= 2) + hash_table_sanitize_eq_limit + = PARAM_VALUE (PARAM_HASH_TABLE_VERIFICATION_LIMIT); + /* Please don't change global_options after this point, those changes won't be reflected in optimization_{default,current}_node. */ } |