Commit 4a5ed6b0 authored by Paul Eggert's avatar Paul Eggert

Port dump_bitset_clear to -fsanitize=undefined

* src/pdumper.c (dump_bitset_clear):
Pacify -fsanitize=undefined by avoiding memset (NULL, x, 0),
which strictly speaking has undefined behavior although it
works on all production platforms I know.
parent f67bc3f1
......@@ -4923,7 +4923,8 @@ static void
dump_bitset_clear (struct dump_bitset *bitset)
int xword_size = sizeof (bitset->bits[0]);
memset (bitset->bits, 0, bitset->number_words * xword_size);
if (bitset->number_words)
memset (bitset->bits, 0, bitset->number_words * xword_size);
struct pdumper_loaded_dump_private
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment