]> git.ipfire.org Git - thirdparty/systemd.git/commit
Rewrite IN_SET() 13093/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 11 Jul 2019 08:17:28 +0000 (10:17 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 17 Jul 2019 12:22:53 +0000 (14:22 +0200)
commitd268ab389c7a7532d52fecdd1d6ab99bce17e6a1
tree4d9e52e22e35ee2a0e0f411df843bf33875b7382
parentab1a1ba5dc80a7657fe09dcb4a614789d56538b2
Rewrite IN_SET()

This restores proper speed with asan builds with gcc 9.1.1.
Fixes #12997.

$ rpm -q gcc
gcc-9.1.1-2.fc31.x86_64

$ time ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1 UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1 build-rawhide-sanitize/test-conf-parser

(old) 86.99s user 20.22s system 361% cpu 29.635 total
(new)  3.05s user  0.29s system  99% cpu  3.377 total

Size is increased a bit:

$ size build/systemd
(old) 1683421  246100    1208 1930729  1d75e9 build/systemd
(new) 1688237  246100    1208 1935545  1d88b9 build/systemd

... but that's <0.1%, so we don't really care.
src/basic/macro.h