Systemd/src/fuzz
Evgeny Vereshchagin cc55ac0171 test: initialize syslog_fd in fuzz-journald-kmsg too
This is a follow-up to 8857fb9beb that prevents the fuzzer from crashing with
```
==220==ERROR: AddressSanitizer: ABRT on unknown address 0x0000000000dc (pc 0x7ff4953c8428 bp 0x7ffcf66ec290 sp 0x7ffcf66ec128 T0)
SCARINESS: 10 (signal)
    #0 0x7ff4953c8427 in gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x35427)
    #1 0x7ff4953ca029 in abort (/lib/x86_64-linux-gnu/libc.so.6+0x37029)
    #2 0x7ff49666503a in log_assert_failed_realm /work/build/../../src/systemd/src/basic/log.c:805:9
    #3 0x7ff496614ecf in safe_close /work/build/../../src/systemd/src/basic/fd-util.c:66:17
    #4 0x548806 in server_done /work/build/../../src/systemd/src/journal/journald-server.c:2064:9
    #5 0x5349fa in LLVMFuzzerTestOneInput /work/build/../../src/systemd/src/fuzz/fuzz-journald-kmsg.c:26:9
    #6 0x592755 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/libfuzzer/FuzzerLoop.cpp:571:15
    #7 0x590627 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool*) /src/libfuzzer/FuzzerLoop.cpp:480:3
    #8 0x594432 in fuzzer::Fuzzer::MutateAndTestOne() /src/libfuzzer/FuzzerLoop.cpp:708:19
    #9 0x5973c6 in fuzzer::Fuzzer::Loop(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, fuzzer::fuzzer_allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) /src/libfuzzer/FuzzerLoop.cpp:839:5
    #10 0x574541 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/libfuzzer/FuzzerDriver.cpp:764:6
    #11 0x5675fc in main /src/libfuzzer/FuzzerMain.cpp:20:10
    #12 0x7ff4953b382f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #13 0x420f58 in _start (/out/fuzz-journald-kmsg+0x420f58)
```
2018-11-16 12:44:47 +01:00
..
fuzz-bus-message.c fuzz-bus-message: add fuzzer for message parsing 2018-10-02 11:09:05 +02:00
fuzz-compress.c fuzz-compress: add fuzzer for compression and decompression 2018-10-30 11:04:53 +01:00
fuzz-dhcp-server.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
fuzz-dhcp-server.options fuzz-dhcp-server: fix name of options file 2018-03-11 16:33:59 +01:00
fuzz-dhcp6-client.c fuzz: explicitly set initial value of global variables 2018-11-12 01:58:17 +09:00
fuzz-dns-packet.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
fuzz-dns-packet.options fuzz: add initial fuzzing infrastructure 2018-01-17 13:57:06 -05:00
fuzz-journal-remote.c fuzz-journal-remote: write to /dev/null not stdout 2018-05-31 14:30:23 +02:00
fuzz-journal-remote.options fuzz-journal-remote: a fuzzer for journal-remote over-the-wire input 2018-05-31 13:04:18 +02:00
fuzz-journald-kmsg.c test: initialize syslog_fd in fuzz-journald-kmsg too 2018-11-16 12:44:47 +01:00
fuzz-journald-native.c tests: add a fuzzer for server_process_native_message 2018-09-03 07:16:52 +00:00
fuzz-journald-syslog.c tests: rework the code fuzzing journald 2018-09-03 06:46:24 +00:00
fuzz-journald.c tests: put fuzz_journald_processing_function in a .c file 2018-09-08 12:05:14 +02:00
fuzz-journald.h tests: put fuzz_journald_processing_function in a .c file 2018-09-08 12:05:14 +02:00
fuzz-json.c tests: add a fuzzer for the json parser and dumper 2018-10-10 10:13:30 +02:00
fuzz-lldp.c fuzz: set SOCK_CLOEXEC and SOCK_NONBLOCK 2018-11-12 01:57:27 +09:00
fuzz-main.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
fuzz-ndisc-rs.c fuzz: explicitly set initial value of global variables 2018-11-12 01:58:17 +09:00
fuzz-unit-file.c fuzz-unit-file: skip BOM (#8723) 2018-04-16 10:59:41 +02:00
fuzz.h tree-wide: add multiple inclusion guard 2018-06-25 13:04:59 +09:00
meson.build tests: add a fuzzer for dev_kmsg_record 2018-11-16 08:44:35 +01:00