]> git.proxmox.com Git - mirror_lxc.git/commit - src/tests/oss-fuzz.sh
oss-fuzz.sh: take SANITIZER into account
authorEvgeny Vereshchagin <evvers@ya.ru>
Sun, 28 Mar 2021 06:42:54 +0000 (06:42 +0000)
committerEvgeny Vereshchagin <evvers@ya.ru>
Sun, 28 Mar 2021 06:52:01 +0000 (06:52 +0000)
commit745d60487b41cb0c677c699c3b98f021277ae2a5
tree02f523eb98f4788ed3e148778a8e8f1b873f85d7
parentdb62570f0f89cb33e6ea3f37f19ba8c028dafe2d
oss-fuzz.sh: take SANITIZER into account

to make it possible to build the fuzzer with UBSan and MSan locally

```
$ SANITIZER=undefined ./src/tests/oss-fuzz.sh
$ printf 'lxc.signal.stop=sigrtmax-020000000020' >oss-fuzz-32596
$ UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1 ./out/fuzz-lxc-config-read oss-fuzz-32596
INFO: Seed: 595864277
INFO: Loaded 1 modules   (61553 inline 8-bit counters): 61553 [0x80a1b0, 0x819221),
INFO: Loaded 1 PC tables (61553 PCs): 61553 [0x819228,0x909938),
./out/fuzz-lxc-config-read: Running 1 inputs 1 time(s) each.
Running: oss-fuzz-32596
confile_utils.c:1051:20: runtime error: signed integer overflow: 64 - -2147483632 cannot be represented in type 'int'
    #0 0x51799a in rt_sig_num /home/vagrant/lxc/src/lxc/confile_utils.c:1051:20
    #1 0x517268 in sig_parse /home/vagrant/lxc/src/lxc/confile_utils.c:1069:11
    #2 0x500ca4 in set_config_signal_stop /home/vagrant/lxc/src/lxc/confile.c:1738:10
    #3 0x4b8c7c in parse_line /home/vagrant/lxc/src/lxc/confile.c:2962:9
    #4 0x5a5eb0 in lxc_file_for_each_line_mmap /home/vagrant/lxc/src/lxc/parse.c:125:9

```

Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
src/tests/oss-fuzz.sh