1
0
mirror of https://github.com/systemd/systemd synced 2024-07-09 04:26:06 +00:00
systemd/test/fuzz/fuzz-etc-hosts
Yu Watanabe 16a6bc5a7a resolve: dedup entries in /etc/hosts
This improves the performance of parsing the file and reduces memory pressure.

Running 'fuzz-etc-hosts timeout-strv' with valgrind,

Before:
total heap usage: 321,020 allocs, 321,020 frees, 15,820,387,193 bytes allocated
real    0m23.531s
user    0m21.458s
sys     0m1.961s

After:
total heap usage: 112,408 allocs, 112,408 frees, 7,297,480 bytes allocated
real    0m8.664s
user    0m8.545s
sys     0m0.065s

Hopefully fixes oss-fuzz#47708 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47708).
2022-12-13 20:37:48 +09:00
..
oss-fuzz-47708 resolve: dedup entries in /etc/hosts 2022-12-13 20:37:48 +09:00
timeout-strv resolved: use strv_extend_with_size() to avoid slow parsing of /etc/hosts 2022-05-20 15:18:28 +02:00