Enable sanitization for hash tables

Programming / Compilers / GCC - marxin [138bc75d-0d04-0410-961f-82ee72b054a4] - 7 June 2019 12:13 EDT

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.

c2880a001e9 Enable sanitization for hash tables.
gcc/ChangeLog | 14 +++++++++++++
gcc/cselib.c | 9 +++++++--
gcc/hash-set.h | 2 +-
gcc/hash-table.c | 3 +++
gcc/hash-table.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++----
gcc/params.def | 6 ++++++
gcc/toplev.c | 4 ++++
7 files changed, 91 insertions(+), 7 deletions(-)

Upstream: gcc.gnu.org


  • Share