Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libzmq: add maintainer, add UBSAN #3829

Merged
merged 4 commits into from
May 20, 2020
Merged

Conversation

bluca
Copy link
Contributor

@bluca bluca commented May 17, 2020

No description provided.

@inferno-chromium
Copy link
Collaborator

looks like libFuzzer MSan and AFL builds are broken in travis, can you fix those or disable those configs in project.yaml

@bluca
Copy link
Contributor Author

bluca commented May 18, 2020

looks like libFuzzer MSan and AFL builds are broken in travis, can you fix those or disable those configs in project.yaml

These are working fine in oss-fuzz runs, when reproducing locally and in the repo's CI, any idea what could be the issue?

@inferno-chromium
Copy link
Collaborator

For MSan build,
BAD BUILD: /tmp/not-out/test_bind_curve_fuzzer seems to have either startup crash or exit:
This fuzzer is crashing on an uninitialized error.
This is not a build error, but crash on verifying if fuzzer works and does not instantly crash on startup, see https://google.github.io/oss-fuzz/advanced-topics/reproducing/#reproducing-build-failures

@bluca
Copy link
Contributor Author

bluca commented May 18, 2020

For MSan build,
BAD BUILD: /tmp/not-out/test_bind_curve_fuzzer seems to have either startup crash or exit:
This fuzzer is crashing on an uninitialized error.
This is not a build error, but crash on verifying if fuzzer works and does not instantly crash on startup, see https://google.github.io/oss-fuzz/advanced-topics/reproducing/#reproducing-build-failures

I already tried as the page suggests, and even running the check_build option of infra/helper.py, and it all looks fine:

$ infra/helper.py check_build libzmq --engine libfuzzer --sanitizer memory
Running: docker run --rm --privileged -i -e FUZZING_ENGINE=libfuzzer -e SANITIZER=memory -e ARCHITECTURE=x86_64 -v /home/luca/git/oss-fuzz/build/out/libzmq:/out -t gcr.io/oss-fuzz-base/base-runner test_all
INFO: performing bad build checks for /tmp/not-out/test_connect_curve_fuzzer.
INFO: performing bad build checks for /tmp/not-out/test_bind_curve_fuzzer.
INFO: performing bad build checks for /tmp/not-out/test_bind_null_fuzzer.
INFO: performing bad build checks for /tmp/not-out/test_z85_decode_fuzzer.
INFO: performing bad build checks for /tmp/not-out/test_connect_null_fuzzer.
INFO: performing bad build checks for /tmp/not-out/test_connect_fuzzer.
INFO: performing bad build checks for /tmp/not-out/test_bind_fuzzer.
7 fuzzers total, 0 seem to be broken (0%).
Check build passed.

@bluca
Copy link
Contributor Author

bluca commented May 18, 2020

The AFL issue seems to be just a timeout that is too short. I do not see a way in the documentation to change it.

@inferno-chromium
Copy link
Collaborator

The AFL issue seems to be just a timeout that is too short. I do not see a way in the documentation to change it.

Yes just disable that fuzzing engine, afl one we keep a low one for efficiency.

@inferno-chromium
Copy link
Collaborator

Can easily reproduce the failure, probably you didn't pull latest images (with newer clang) ?

python infra/helper.py pull_images
python infra/helper.py build_fuzzers libzmq --engine libfuzzer --sanitizer memory
python infra/helper.py check_build libzmq --engine libfuzzer --sanitizer memory
BAD BUILD: /tmp/not-out/test_connect_null_fuzzer seems to have either startup crash or exit:
INFO: Seed: 1337
INFO: Loaded 1 modules   (17921 inline 8-bit counters): 17921 [0xc2e998, 0xc32f99), 
INFO: Loaded 1 PC tables (17921 PCs): 17921 [0xc32fa0,0xc78fb0), 
INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes
==265==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x59d213 in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__get_pointer() const /usr/local/bin/../include/c++/v1/string:1517:17
    #1 0x559fd1 in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::data() const /usr/local/bin/../include/c++/v1/string:1245:75
    #2 0x60e9c4 in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::find(char const*, unsigned long) const /usr/local/bin/../include/c++/v1/string:3471:10
    #3 0x60e4d0 in zmq::socket_base_t::parse_uri(char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) /src/libzmq/src/socket_base.cpp:329:44
    #4 0x615d4e in zmq::socket_base_t::connect_internal(char const*) /src/libzmq/src/socket_base.cpp:792:9
    #5 0x615a82 in zmq::socket_base_t::connect(char const*) /src/libzmq/src/socket_base.cpp:773:12
    #6 0x5362ac in zmq_connect /src/libzmq/src/zmq.cpp:337:15
    #7 0x522b30 in LLVMFuzzerTestOneInput /src/libzmq/tests/test_connect_null_fuzzer.cpp:52:5
    #8 0x45a141 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:556:15
    #9 0x45bc66 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:743:3
    #10 0x45c0d9 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:794:3
    #11 0x44b3ae in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:826:6
    #12 0x473b82 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:19:10
    #13 0x7f2993eb182f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #14 0x41fab8 in _start (/tmp/not-out/test_connect_null_fuzzer+0x41fab8)

DEDUP_TOKEN: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__get_pointer() const--std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::data() const--std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::find(char const*, unsigned long) const
  Uninitialized value was created by an allocation of 'uri' in the stack frame of function '_ZN3zmq13socket_base_t9parse_uriEPKcRNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESA_'
    #0 0x60e3b0 in zmq::socket_base_t::parse_uri(char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) /src/libzmq/src/socket_base.cpp:325

DEDUP_TOKEN: zmq::socket_base_t::parse_uri(char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)
SUMMARY: MemorySanitizer: use-of-uninitialized-value /usr/local/bin/../include/c++/v1/string:1517:17 in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__get_pointer() const
Unique heap origins: 32
Stack depot allocated bytes: 3472
Unique origin histories: 1
History depot allocated bytes: 24
Exiting

@bluca
Copy link
Contributor Author

bluca commented May 18, 2020

I did pull - tried again, same result, works fine

@bluca
Copy link
Contributor Author

bluca commented May 18, 2020

Tried purging everything in docker, still works just fine. I'll just ignore this, the important thing is that it works in oss-fuzz itself.

I set the fuzzing_engines to libfuzzer in project.yaml, which I think should disable afl.

@TravisBuddy
Copy link

Travis tests have failed

Hey @bluca,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

4th Build

View build log

./infra/travis/travis_build.py
Building project libzmq
Running command: python /home/travis/build/google/oss-fuzz/infra/helper.py build_fuzzers libzmq --engine libfuzzer --sanitizer address --architecture i386
Running: docker build -t gcr.io/oss-fuzz/libzmq projects/libzmq

Step 1/7 : FROM gcr.io/oss-fuzz-base/base-builder
latest: Pulling from oss-fuzz-base/base-builder






















Digest: sha256:d10d720fa2dbbea2fa15f36685b3cbc3e6a01aefd57f7ff606ff745fa13e4982
Status: Downloaded newer image for gcr.io/oss-fuzz-base/base-builder:latest
 ---> 230bdb668243
Step 2/7 : MAINTAINER [email protected]
 ---> Running in 252115ceeb7a
Removing intermediate container 252115ceeb7a
 ---> 6b6a6d3b709e
Step 3/7 : RUN apt-get update && apt-get install -y make autoconf automake libtool gettext pkg-config build-essential
 ---> Running in a89a2c672c91
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Fetched 325 kB in 0s (391 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
make is already the newest version (4.1-6).
The following additional packages will be installed:
  autotools-dev bzip2 dpkg-dev fakeroot g++ g++-5 gettext-base
  libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
  libasprintf-dev libasprintf0v5 libcroco3 libdpkg-perl libfakeroot
  libfile-fcntllock-perl libgettextpo-dev libgettextpo0 libglib2.0-0
  libglib2.0-data libicu55 libltdl-dev libltdl7 libsigsegv2 libstdc++-5-dev
  libunistring0 libxml2 m4 sgml-base shared-mime-info xdg-user-dirs xml-core
  xz-utils
Suggested packages:
  autoconf-archive gnu-standards autoconf-doc bzip2-doc debian-keyring
  g++-multilib g++-5-multilib gcc-5-doc libstdc++6-5-dbg gettext-doc autopoint
  libtool-doc libstdc++-5-doc gfortran | fortran95-compiler gcj-jdk
  sgml-base-doc debhelper
The following NEW packages will be installed:
  autoconf automake autotools-dev build-essential bzip2 dpkg-dev fakeroot g++
  g++-5 gettext gettext-base libalgorithm-diff-perl libalgorithm-diff-xs-perl
  libalgorithm-merge-perl libasprintf-dev libasprintf0v5 libcroco3
  libdpkg-perl libfakeroot libfile-fcntllock-perl libgettextpo-dev
  libgettextpo0 libglib2.0-0 libglib2.0-data libicu55 libltdl-dev libltdl7
  libsigsegv2 libstdc++-5-dev libtool libunistring0 libxml2 m4 pkg-config
  sgml-base shared-mime-info xdg-user-dirs xml-core xz-utils
0 upgraded, 39 newly installed, 0 to remove and 0 not upgraded.
Need to get 24.3 MB of archives.
After this operation, 97.8 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libglib2.0-0 amd64 2.48.2-0ubuntu4.6 [1120 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial/main amd64 sgml-base all 1.26+nmu4ubuntu1 [12.5 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 libsigsegv2 amd64 2.10-4 [14.1 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial/main amd64 libunistring0 amd64 0.9.3-5.2ubuntu1 [279 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 bzip2 amd64 1.0.6-8ubuntu0.2 [32.5 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libasprintf0v5 amd64 0.19.7-2ubuntu3.1 [6568 B]
Get:7 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 gettext-base amd64 0.19.7-2ubuntu3.1 [48.0 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libglib2.0-data all 2.48.2-0ubuntu4.6 [131 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libicu55 amd64 55.1-7ubuntu0.5 [7650 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libxml2 amd64 2.9.3+dfsg1-1ubuntu0.7 [698 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 shared-mime-info amd64 1.5-2ubuntu0.2 [405 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 xdg-user-dirs amd64 0.15-2ubuntu6.16.04.1 [61.8 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial/main amd64 xml-core all 0.13+nmu2 [23.3 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial/main amd64 m4 amd64 1.4.17-5 [195 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial/main amd64 autoconf all 2.69-9 [321 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial/main amd64 autotools-dev all 20150820.1 [39.8 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial/main amd64 automake all 1:1.15-4ubuntu1 [510 kB]
Get:18 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libstdc++-5-dev amd64 5.4.0-6ubuntu1~16.04.12 [1428 kB]
Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 g++-5 amd64 5.4.0-6ubuntu1~16.04.12 [8430 kB]
Get:20 http://archive.ubuntu.com/ubuntu xenial/main amd64 g++ amd64 4:5.3.1-1ubuntu1 [1504 B]
Get:21 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libdpkg-perl all 1.18.4ubuntu1.6 [195 kB]
Get:22 http://archive.ubuntu.com/ubuntu xenial/main amd64 xz-utils amd64 5.1.1alpha+20120614-2ubuntu2 [78.8 kB]
Get:23 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 dpkg-dev all 1.18.4ubuntu1.6 [584 kB]
Get:24 http://archive.ubuntu.com/ubuntu xenial/main amd64 build-essential amd64 12.1ubuntu2 [4758 B]
Get:25 http://archive.ubuntu.com/ubuntu xenial/main amd64 libfakeroot amd64 1.20.2-1ubuntu1 [25.5 kB]
Get:26 http://archive.ubuntu.com/ubuntu xenial/main amd64 fakeroot amd64 1.20.2-1ubuntu1 [61.8 kB]
Get:27 http://archive.ubuntu.com/ubuntu xenial/main amd64 libcroco3 amd64 0.6.11-1 [81.6 kB]
Get:28 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 gettext amd64 0.19.7-2ubuntu3.1 [1082 kB]
Get:29 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-diff-perl all 1.19.03-1 [47.6 kB]
Get:30 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-diff-xs-perl amd64 0.04-4build1 [11.0 kB]
Get:31 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-merge-perl all 0.08-3 [12.0 kB]
Get:32 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libasprintf-dev amd64 0.19.7-2ubuntu3.1 [4778 B]
Get:33 http://archive.ubuntu.com/ubuntu xenial/main amd64 libfile-fcntllock-perl amd64 0.22-3 [32.0 kB]
Get:34 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgettextpo0 amd64 0.19.7-2ubuntu3.1 [125 kB]
Get:35 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgettextpo-dev amd64 0.19.7-2ubuntu3.1 [141 kB]
Get:36 http://archive.ubuntu.com/ubuntu xenial/main amd64 libltdl7 amd64 2.4.6-0.1 [38.3 kB]
Get:37 http://archive.ubuntu.com/ubuntu xenial/main amd64 libltdl-dev amd64 2.4.6-0.1 [162 kB]
Get:38 http://archive.ubuntu.com/ubuntu xenial/main amd64 libtool all 2.4.6-0.1 [193 kB]
Get:39 http://archive.ubuntu.com/ubuntu xenial/main amd64 pkg-config amd64 0.29.1-0ubuntu1 [45.0 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 24.3 MB in 2s (11.6 MB/s)
Selecting previously unselected package libglib2.0-0:amd64.
(Reading database ... 14808 files and directories currently installed.)
Preparing to unpack .../libglib2.0-0_2.48.2-0ubuntu4.6_amd64.deb ...
Unpacking libglib2.0-0:amd64 (2.48.2-0ubuntu4.6) ...
Selecting previously unselected package sgml-base.
Preparing to unpack .../sgml-base_1.26+nmu4ubuntu1_all.deb ...
Unpacking sgml-base (1.26+nmu4ubuntu1) ...
Selecting previously unselected package libsigsegv2:amd64.
Preparing to unpack .../libsigsegv2_2.10-4_amd64.deb ...
Unpacking libsigsegv2:amd64 (2.10-4) ...
Selecting previously unselected package libunistring0:amd64.
Preparing to unpack .../libunistring0_0.9.3-5.2ubuntu1_amd64.deb ...
Unpacking libunistring0:amd64 (0.9.3-5.2ubuntu1) ...
Selecting previously unselected package bzip2.
Preparing to unpack .../bzip2_1.0.6-8ubuntu0.2_amd64.deb ...
Unpacking bzip2 (1.0.6-8ubuntu0.2) ...
Selecting previously unselected package libasprintf0v5:amd64.
Preparing to unpack .../libasprintf0v5_0.19.7-2ubuntu3.1_amd64.deb ...
Unpacking libasprintf0v5:amd64 (0.19.7-2ubuntu3.1) ...
Selecting previously unselected package gettext-base.
Preparing to unpack .../gettext-base_0.19.7-2ubuntu3.1_amd64.deb ...
Unpacking gettext-base (0.19.7-2ubuntu3.1) ...
Selecting previously unselected package libglib2.0-data.
Preparing to unpack .../libglib2.0-data_2.48.2-0ubuntu4.6_all.deb ...
Unpacking libglib2.0-data (2.48.2-0ubuntu4.6) ...
Selecting previously unselected package libicu55:amd64.
Preparing to unpack .../libicu55_55.1-7ubuntu0.5_amd64.deb ...
Unpacking libicu55:amd64 (55.1-7ubuntu0.5) ...
Selecting previously unselected package libxml2:amd64.
Preparing to unpack .../libxml2_2.9.3+dfsg1-1ubuntu0.7_amd64.deb ...
Unpacking libxml2:amd64 (2.9.3+dfsg1-1ubuntu0.7) ...
Selecting previously unselected package shared-mime-info.
Preparing to unpack .../shared-mime-info_1.5-2ubuntu0.2_amd64.deb ...
Unpacking shared-mime-info (1.5-2ubuntu0.2) ...
Selecting previously unselected package xdg-user-dirs.
Preparing to unpack .../xdg-user-dirs_0.15-2ubuntu6.16.04.1_amd64.deb ...
Unpacking xdg-user-dirs (0.15-2ubuntu6.16.04.1) ...
Selecting previously unselected package xml-core.
Preparing to unpack .../xml-core_0.13+nmu2_all.deb ...
Unpacking xml-core (0.13+nmu2) ...
Selecting previously unselected package m4.
Preparing to unpack .../archives/m4_1.4.17-5_amd64.deb ...
Unpacking m4 (1.4.17-5) ...
Selecting previously unselected package autoconf.
Preparing to unpack .../autoconf_2.69-9_all.deb ...
Unpacking autoconf (2.69-9) ...
Selecting previously unselected package autotools-dev.
Preparing to unpack .../autotools-dev_20150820.1_all.deb ...
Unpacking autotools-dev (20150820.1) ...
Selecting previously unselected package automake.
Preparing to unpack .../automake_1%3a1.15-4ubuntu1_all.deb ...
Unpacking automake (1:1.15-4ubuntu1) ...
Selecting previously unselected package libstdc++-5-dev:amd64.
Preparing to unpack .../libstdc++-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb ...
Unpacking libstdc++-5-dev:amd64 (5.4.0-6ubuntu1~16.04.12) ...
Selecting previously unselected package g++-5.
Preparing to unpack .../g++-5_5.4.0-6ubuntu1~16.04.12_amd64.deb ...
Unpacking g++-5 (5.4.0-6ubuntu1~16.04.12) ...
Selecting previously unselected package g++.
Preparing to unpack .../g++_4%3a5.3.1-1ubuntu1_amd64.deb ...
Unpacking g++ (4:5.3.1-1ubuntu1) ...
Selecting previously unselected package libdpkg-perl.
Preparing to unpack .../libdpkg-perl_1.18.4ubuntu1.6_all.deb ...
Unpacking libdpkg-perl (1.18.4ubuntu1.6) ...
Selecting previously unselected package xz-utils.
Preparing to unpack .../xz-utils_5.1.1alpha+20120614-2ubuntu2_amd64.deb ...
Unpacking xz-utils (5.1.1alpha+20120614-2ubuntu2) ...
Selecting previously unselected package dpkg-dev.
Preparing to unpack .../dpkg-dev_1.18.4ubuntu1.6_all.deb ...
Unpacking dpkg-dev (1.18.4ubuntu1.6) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../build-essential_12.1ubuntu2_amd64.deb ...
Unpacking build-essential (12.1ubuntu2) ...
Selecting previously unselected package libfakeroot:amd64.
Preparing to unpack .../libfakeroot_1.20.2-1ubuntu1_amd64.deb ...
Unpacking libfakeroot:amd64 (1.20.2-1ubuntu1) ...
Selecting previously unselected package fakeroot.
Preparing to unpack .../fakeroot_1.20.2-1ubuntu1_amd64.deb ...
Unpacking fakeroot (1.20.2-1ubuntu1) ...
Selecting previously unselected package libcroco3:amd64.
Preparing to unpack .../libcroco3_0.6.11-1_amd64.deb ...
Unpacking libcroco3:amd64 (0.6.11-1) ...
Selecting previously unselected package gettext.
Preparing to unpack .../gettext_0.19.7-2ubuntu3.1_amd64.deb ...
Unpacking gettext (0.19.7-2ubuntu3.1) ...
Selecting previously unselected package libalgorithm-diff-perl.
Preparing to unpack .../libalgorithm-diff-perl_1.19.03-1_all.deb ...
Unpacking libalgorithm-diff-perl (1.19.03-1) ...
Selecting previously unselected package libalgorithm-diff-xs-perl.
Preparing to unpack .../libalgorithm-diff-xs-perl_0.04-4build1_amd64.deb ...
Unpacking libalgorithm-diff-xs-perl (0.04-4build1) ...
Selecting previously unselected package libalgorithm-merge-perl.
Preparing to unpack .../libalgorithm-merge-perl_0.08-3_all.deb ...
Unpacking libalgorithm-merge-perl (0.08-3) ...
Selecting previously unselected package libasprintf-dev:amd64.
Preparing to unpack .../libasprintf-dev_0.19.7-2ubuntu3.1_amd64.deb ...
Unpacking libasprintf-dev:amd64 (0.19.7-2ubuntu3.1) ...
Selecting previously unselected package libfile-fcntllock-perl.
Preparing to unpack .../libfile-fcntllock-perl_0.22-3_amd64.deb ...
Unpacking libfile-fcntllock-perl (0.22-3) ...
Selecting previously unselected package libgettextpo0:amd64.
Preparing to unpack .../libgettextpo0_0.19.7-2ubuntu3.1_amd64.deb ...
Unpacking libgettextpo0:amd64 (0.19.7-2ubuntu3.1) ...
Selecting previously unselected package libgettextpo-dev:amd64.
Preparing to unpack .../libgettextpo-dev_0.19.7-2ubuntu3.1_amd64.deb ...
Unpacking libgettextpo-dev:amd64 (0.19.7-2ubuntu3.1) ...
Selecting previously unselected package libltdl7:amd64.
Preparing to unpack .../libltdl7_2.4.6-0.1_amd64.deb ...
Unpacking libltdl7:amd64 (2.4.6-0.1) ...
Selecting previously unselected package libltdl-dev:amd64.
Preparing to unpack .../libltdl-dev_2.4.6-0.1_amd64.deb ...
Unpacking libltdl-dev:amd64 (2.4.6-0.1) ...
Selecting previously unselected package libtool.
Preparing to unpack .../libtool_2.4.6-0.1_all.deb ...
Unpacking libtool (2.4.6-0.1) ...
Selecting previously unselected package pkg-config.
Preparing to unpack .../pkg-config_0.29.1-0ubuntu1_amd64.deb ...
Unpacking pkg-config (0.29.1-0ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libglib2.0-0:amd64 (2.48.2-0ubuntu4.6) ...
No schema files found: doing nothing.
Setting up sgml-base (1.26+nmu4ubuntu1) ...
Setting up libsigsegv2:amd64 (2.10-4) ...
Setting up libunistring0:amd64 (0.9.3-5.2ubuntu1) ...
Setting up bzip2 (1.0.6-8ubuntu0.2) ...
Setting up libasprintf0v5:amd64 (0.19.7-2ubuntu3.1) ...
Setting up gettext-base (0.19.7-2ubuntu3.1) ...
Setting up libglib2.0-data (2.48.2-0ubuntu4.6) ...
Setting up libicu55:amd64 (55.1-7ubuntu0.5) ...
Setting up libxml2:amd64 (2.9.3+dfsg1-1ubuntu0.7) ...
Setting up shared-mime-info (1.5-2ubuntu0.2) ...
Setting up xdg-user-dirs (0.15-2ubuntu6.16.04.1) ...
Setting up xml-core (0.13+nmu2) ...
Setting up m4 (1.4.17-5) ...
Setting up autoconf (2.69-9) ...
Setting up autotools-dev (20150820.1) ...
Setting up automake (1:1.15-4ubuntu1) ...
update-alternatives: using /usr/bin/automake-1.15 to provide /usr/bin/automake (automake) in auto mode
Setting up libstdc++-5-dev:amd64 (5.4.0-6ubuntu1~16.04.12) ...
Setting up g++-5 (5.4.0-6ubuntu1~16.04.12) ...
Setting up g++ (4:5.3.1-1ubuntu1) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up libdpkg-perl (1.18.4ubuntu1.6) ...
Setting up xz-utils (5.1.1alpha+20120614-2ubuntu2) ...
update-alternatives: using /usr/bin/xz to provide /usr/bin/lzma (lzma) in auto mode
Setting up dpkg-dev (1.18.4ubuntu1.6) ...
Setting up build-essential (12.1ubuntu2) ...
Setting up libfakeroot:amd64 (1.20.2-1ubuntu1) ...
Setting up fakeroot (1.20.2-1ubuntu1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Setting up libcroco3:amd64 (0.6.11-1) ...
Setting up gettext (0.19.7-2ubuntu3.1) ...
Setting up libalgorithm-diff-perl (1.19.03-1) ...
Setting up libalgorithm-diff-xs-perl (0.04-4build1) ...
Setting up libalgorithm-merge-perl (0.08-3) ...
Setting up libasprintf-dev:amd64 (0.19.7-2ubuntu3.1) ...
Setting up libfile-fcntllock-perl (0.22-3) ...
Setting up libgettextpo0:amd64 (0.19.7-2ubuntu3.1) ...
Setting up libgettextpo-dev:amd64 (0.19.7-2ubuntu3.1) ...
Setting up libltdl7:amd64 (2.4.6-0.1) ...
Setting up libltdl-dev:amd64 (2.4.6-0.1) ...
Setting up libtool (2.4.6-0.1) ...
Setting up pkg-config (0.29.1-0ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Removing intermediate container a89a2c672c91
 ---> 73174d66e21e
Step 4/7 : RUN git clone --depth 1 https://github.com/zeromq/libzmq.git
 ---> Running in 9c44782459e0
Cloning into 'libzmq'...
Removing intermediate container 9c44782459e0
 ---> 42db38484793
Step 5/7 : RUN git clone --depth 1 -b stable https://github.com/jedisct1/libsodium.git
 ---> Running in b97fce785462
Cloning into 'libsodium'...
Removing intermediate container b97fce785462
 ---> 7a83437e087b
Step 6/7 : WORKDIR libzmq
 ---> Running in e197b547b1cd
Removing intermediate container e197b547b1cd
 ---> 1db10647b3ae
Step 7/7 : COPY build.sh $SRC/
 ---> 39d1696f925d
Successfully built 39d1696f925d
Successfully tagged gcr.io/oss-fuzz/libzmq:latest
Keeping existing build artifacts as-is (if any).
Running: docker run --rm --privileged -i --cap-add SYS_PTRACE -e FUZZING_ENGINE=libfuzzer -e FUZZING_LANGUAGE=c++ -e SANITIZER=address -e ARCHITECTURE=i386 -v /home/travis/build/google/oss-fuzz/build/out/libzmq:/out -v /home/travis/build/google/oss-fuzz/build/work/libzmq:/work -t gcr.io/oss-fuzz/libzmq
---------------------------------------------------------------
Compiling libFuzzer to /usr/lib/libFuzzingEngine.a... ar: creating /usr/lib/libFuzzingEngine.a
 done.
CC=clang
CXX=clang++
CFLAGS=-m32 -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link
CXXFLAGS=-m32 -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++
---------------------------------------------------------------
+ cd /src/libsodium
+ ./autogen.sh
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:75: installing 'build-aux/compile'
configure.ac:10: installing 'build-aux/missing'
src/libsodium/Makefile.am: installing 'build-aux/depcomp'
autoreconf: Leaving directory `.'
Downloading config.guess and config.sub...
Done.
+ ./configure --disable-shared
configure: error: cannot run /bin/bash build-aux/config.sub
Building fuzzers failed.
Failed projects: libzmq
TravisBuddy Request Identifier: 1709ab80-9929-11ea-860e-87b20eb63714

There is no sanity check and if the download fails because gnu.org is down
the build fails with unhelpful errors
@bluca
Copy link
Contributor Author

bluca commented May 19, 2020

Tried purging everything in docker, still works just fine. I'll just ignore this, the important thing is that it works in oss-fuzz itself.

Looks like it's failing in oss-fuzz too now. Still can't reproduce, but I can get test builds on travis-ci.com now so I'll try a few things there

@inferno-chromium
Copy link
Collaborator

MSan can be fixed in another CL, merging this.

@inferno-chromium inferno-chromium merged commit 8ca308e into google:master May 20, 2020
@bluca bluca deleted the libzmq branch May 20, 2020 07:47
@bluca
Copy link
Contributor Author

bluca commented May 20, 2020

MSAN failures seem to be false positive in Clang, see: #3855

zchcai added a commit to zchcai/oss-fuzz that referenced this pull request Jun 3, 2020
* [cryptofuzz] Add Microsoft SymCrypt (google#3826)

* [gRPC-gateway] Initial integration (google#3807)

* [doc] Update new_project_guide.md (google#3828)

* [knot-dns] link against liblmdb statically (google#3797)

Relates to https://gitlab.labs.nic.cz/knot/knot-dns/-/commit/d4ec3a3aa8b7e2ba4d196e2f7984173069e3d91b

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22191

* Simplify rust project setup. (google#3830)

* Simplify rust project setup.

- Add rust and cargo-fuzz in base builder.
- Set RUSTC_BOOSTRAP to make ASan available.
- Set RUSTFLAGS and C,CXXFLAGS properly.

* Quick fix for helper.py build_fuzzers. (google#3832)

* Parse project language and use in infra/helper.py (google#3834)

* Parse project language and use in infra/helper.py

* Fix exception message.

* Add FUZZING_LANGUAGE to build step. (google#3835)

* Add fuzzing language correctly during compile step. (google#3837)

* Remove unneeded rust hacks after google#3830. (google#3840)

* Fix missing FUZZING_LANGUAGE in coverage build. (google#3843)

* Use hardcoded FUZZING_LANGUAGE to unbreak CIFuzz. (google#3844)

* solidity: Disable Z3 build in dockerfile (google#3831)

* cifuzz: use pull_request.number instead of GITHUB_REF (google#3845)

Closes google#3732

* wasmtime: build fuzz targets with --all-features (google#3850)

This enables not only the binaryen-using fuzz targets, but also the peepmatic fuzz targets (which is necessary after bytecodealliance/wasmtime#1727).

* Relax project language requirement. (google#3846)

This is necessary for the bisector to be able to build older revisions.

Print a warning instead.

* libzmq: add maintainer, add UBSAN (google#3829)

* Add another maintainer to libzmq's CC list

* Enable UBSAN for libzmq

* libzmq: disable afl fuzzer, CI fails

* libsodium: do not let libsodium's autogen.sh download files from gnu.org

There is no sanity check and if the download fails because gnu.org is down
the build fails with unhelpful errors

* Fixed changes added in clang-11.0. (google#3852)

* Bump httplib2 from 0.11.3 to 0.18.0 in /infra/gcb (google#3853)

Bumps [httplib2](https://github.com/httplib2/httplib2) from 0.11.3 to 0.18.0.
- [Release notes](https://github.com/httplib2/httplib2/releases)
- [Changelog](https://github.com/httplib2/httplib2/blob/master/CHANGELOG)
- [Commits](httplib2/httplib2@v0.11.3...v0.18.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [TiDB] initial integration (google#3849)

* [Minify] Initial integration (google#3848)

* Set rust flags always in compile step. (google#3859)

This is needed for projects that mix both rust and c/c++.

* Remove unneeded RUSTC_BOOTSTRAP since nightly is used

* [fasthttp] Initial integration (google#3858)

* [libfido2] bump libcbor version from 0.5.0 to 0.7.0 (google#3861)

* Fix cras build failure, use default rust nightly.

* Don't add Rust sanitizer flags when using ubsan or i386. (google#3862)

Rust sanitizer flags are not supported for these configs.
Fixes Cras and ecc-diff-fuzzer builds.

* [hermes] Initial setup for Hermes (google#3698)

* [poppler] Exercise a few more methods (google#3857)

* [minify] Moved build script upstream (google#3867)

* Use available nightly rust for spidermonkey build

* Use available rust nightly in spidermonkey-ufi

* Use available rust nightly in firefox

* [python3-libraries] Fix build (google#3869)

* Use latest git version. (google#3870)

Adds features needed by firefox and spidermonkey-ufi builds.

* libzmq: fix MSAN (google#3868)

* libzmq: build libsodium with --disable-asm to avoid false positives in MSAN checks

* libzmq: set autoconf install prefix to avoid /usr/local being added to the linker library paths

A non-working version of the standard library is installed in oss-fuzz's images
under /usr/local/lib. Using it breaks MSAN's tests with false positives.
Set the prefix in autoconf to something different from the default
/usr/local, as /lib is added by autoconf automatically to the linker
flags, which means this broken standard library is used instead of the
instrumented one in /usr/lib.

* build_specified_commit: revert to using cp. (google#3871)


rsync seems to have disappeared in the latest images somehow, and we
can't rely on it always existing.

* Don't add sanitizer=coverage in RUSTFLAGS

* Remove libpcap patch merged upstream (google#3865)

* Install Python 3.8.3 on builder image. (google#3874)

Part of fixing google#3756.

* [qt] Get a shallow clone of qtbase (google#3872)

Reduces the size by nearly 200 MB

* [qt] Add fuzzer for QImage::loadFromData() (google#3873)

* Fix jsoncpp build

* build_specified_commit: Don't replace gitdir if already relative. (google#3875)

Upgraded git broke this.

* [skia] Speculative build fix (google#3847)

* [stb] extend code coverage for stb_image (google#3784)

* [stb] extend code coverage for stb_image

* remove wget's from build.sh

* add wget's to Dockerfile

* fix Dockerfile

* [hermes] Fix coverage build (google#3877)

* Update email address to non-alias for clusterfuzz login (google#3878)

* add hosts and interns (google#3879)

Signed-off-by: Asra Ali <[email protected]>

* [qt] Don't install build-essential (google#3880)

It's in base-builder now.

* [hermes] Add CC for issues (google#3882)

* [systemd] turn off hongfuzz (google#3889)

See google#3887

* Remove libbz2-dev dependency installed in base-builder for python3 (google#3890)

* Remove libbz2-dev dependency installed in base-builder for python3

Fixes google#3888

* Revert "[systemd] turn off hongfuzz (google#3889)" (google#3891)

This reverts commit d638fac.

* Set up python in one docker layer, remove python deps. (google#3893)

* Set up python in one docker layer.

Address review comment in google#3890 (review)

* Remove all python dependencies, keep build-essential.

* Makes suricata work with rust sanitizers (google#3897)

* [firefox] Fix libFuzzer cloning process (google#3896)

* Fix spidermonkey-ufi build.

* [nanopb] Use $(which python3) instead of hardcoding /usr/bin/python3 (google#3895)

After the addition of Python 3.8 in google#3874, the default python3 is
now /usr/local/bin/python3. The nanopb Dockerfile hardcoded a path
of /usr/bin/python3, causing again problems of Python packages being
installed for different version than attempting to run with.

* Fix CIFuzz issue where targets assumed in OSS-Fuzz build if exists (google#3817)

Make some other changes:
1. Refactor fuzz_target.py and fuzz_target_test.py
2. Introduce pyfakefs and parameterized as dependencies and use them
in tests.
3. Fix infra-tests in CI so that they use installed dependencies

* Fix spidermonkey-ufi build

* Extend Zeek project auto_ccs (google#3898)

* [libgd] Add another fuzzer to libgd (google#3892)

* [qt] Add qtdeclarative (google#3901)

* [qt] Add qtdeclarative

* [qt] Ignore stdout from make

"The job exceeded the maximum log length, and has been terminated."

* Updating jsoncpp primary contact (google#3900)

* [php] Remove --enable-json (google#3899)

JSON is now always compiled in, and cannot be explicitly enabled.

* Don't create empty corpus archive as it wont unpack. (google#3903)

* Update email addresses for Prometheus (google#3905)

Signed-off-by: Julius Volz <[email protected]>

* [cryptofuzz] wolfCrypt: Build with support for AES-CFB, AES-OFB (google#3904)

* libzmq: enable honggfuzz (google#3909)

* Update Prometheus maintainer in Dockerfile (google#3906)

...to myself (Prometheus co-creator).

Signed-off-by: Julius Volz <[email protected]>

* Revert "[systemd] remove my non-gmail address (google#3606)" (google#3910)

This reverts commit 65dcabc.

* [GDAL] Move clone of dependencies to upstream repository (google#3911)

Cloning of build dependencies and patching is now done by
https://github.com/OSGeo/gdal/blob/master/gdal/fuzzers/build.sh

* bump libtorrent to fuzz the 2.0 release branch (google#3913)

* [FFmpeg] install rsync as it is required for the seed corpus (google#3912)

Fixes: Issue 22500 (build failure)

* Fix builds_status cron exception. (google#3914)

When build log is not found, skip it and avoid 404.
Fixes exception
```
Traceback (most recent call last):
  File "oss-fuzz/infra/gcb/builds_status.py", line 243, in <module>
    main()
  File "oss-fuzz/infra/gcb/builds_status.py", line 228, in main
    status_filename='status.json')
  File "oss-fuzz/infra/gcb/builds_status.py", line 159, in update_build_status
    last_build = find_last_build(builds, project, build_tag_suffix)
  File "oss-fuzz/infra/gcb/builds_status.py", line 102, in find_last_build
    log.download_to_filename(f.name)
  File "/var/jenkins_home/workspace/infra/builds_status/ENV/local/lib/python2.7/site-packages/google/cloud/storage/blob.py", line 565, in download_to_filename
    file_obj, client=client, start=start, end=end)
  File "/var/jenkins_home/workspace/infra/builds_status/ENV/local/lib/python2.7/site-packages/google/cloud/storage/blob.py", line 537, in download_to_file
    _raise_from_invalid_response(exc)
  File "/var/jenkins_home/workspace/infra/builds_status/ENV/local/lib/python2.7/site-packages/google/cloud/storage/blob.py", line 1873, in _raise_from_invalid_response
    raise exceptions.from_http_response(error.response)
google.api_core.exceptions.NotFound: 404 GET https://www.googleapis.com/download/storage/v1/b/oss-fuzz-gcb-logs/o/log-9fca5dab-72bf-4970-9557-86b93ede51e0.txt?alt=media: No such object: oss-fuzz-gcb-logs/log-9fca5dab-72bf-4970-9557-86b93ede51e0.txt
Build step 'Execute shell' marked build as failure
Finished: FAILURE
```

* Retry building project images in build_specified_commit. (google#3915)

To mitigate transient network issues.

* Prometheus: Don't use WORKDIR $SRC (google#3908)

This makes build_fuzzers work with local checkouts.

Without this, it complains with 'Cannot use local checkout with "WORKDIR
/src".'

Signed-off-by: Julien Pivotto <[email protected]>

* [systemd] add DaanDeMeyer's address (google#3916)

* [muparser] initial integration (google#3814)

* [haproxy] Fix build failures. (google#3884)

* Updated the haproxy fuzzers to build again.

* The frame decoder needs additional updates since we need to call init_h2 to initialise a memory pool. Disabling this for now as this is a larger change in the code base and will fix up in the coming week.

* Fixed hpack decode.

* Updated the yaml since we dont want memory sanitizer.

* Update project.yaml (google#3917)

* install rsync (google#3920)

* [LibRaw] Initial integration (google#3918)

* Init integration

* Fix formatting

* Add size check

* Update maintainers

* PR Feedback

* Add newline

* Disable UBSan vptr

* Disable building examples

* Remove disabling UBSan vptr

Co-authored-by: Jamie Pinheiro <[email protected]>

* ecc-diff-fuzzer buils nettle without openssl (google#3922)

* Update Dockerfile (google#3923)

* Added contact to zlib-ng project auto_ccs. (google#3924)

* [qt] Add pdf to image corpus (google#3926)

* [haproxy] Minor fix (google#3928)

* Revert "[qt] Add pdf to image corpus (google#3926)" (google#3929)

To handle PDFs, QImage requires qtwebengine
which doesn't build statically.

This reverts commit 934c770.

* Fix TensorFlow build (google#3930)

* Remove [email protected] as he left Google

* Use python3 as python2 is deprecated

* Need to manually install numpy now as it is used in the toolchain

* Use bazelisk instead of the grep configure -> get Bazel version -> curl hack

* Remove C++11 constraint as TF now builds and uses C++14

* Handle review

* Remove source sed/replace as it is no longer needed

Co-authored-by: Guido Vranken <[email protected]>
Co-authored-by: AdamKorcz <[email protected]>
Co-authored-by: Daniel Salzman <[email protected]>
Co-authored-by: Abhishek Arya <[email protected]>
Co-authored-by: Oliver Chang <[email protected]>
Co-authored-by: Bhargava Shastry <[email protected]>
Co-authored-by: Evgeny Vereshchagin <[email protected]>
Co-authored-by: Nick Fitzgerald <[email protected]>
Co-authored-by: Luca Boccassi <[email protected]>
Co-authored-by: DavidKorczynski <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Kihlman <[email protected]>
Co-authored-by: neildhar <[email protected]>
Co-authored-by: tsdgeos <[email protected]>
Co-authored-by: Catena cyber <[email protected]>
Co-authored-by: Robert Löhning <[email protected]>
Co-authored-by: Kevin Lubick <[email protected]>
Co-authored-by: Randy <[email protected]>
Co-authored-by: Will <[email protected]>
Co-authored-by: asraa <[email protected]>
Co-authored-by: Christian Holler (:decoder) <[email protected]>
Co-authored-by: Petteri Aimonen <[email protected]>
Co-authored-by: jonathanmetzman <[email protected]>
Co-authored-by: Jon Siwek <[email protected]>
Co-authored-by: Google AutoFuzz Team <[email protected]>
Co-authored-by: kabeer27 <[email protected]>
Co-authored-by: Nikita Popov <[email protected]>
Co-authored-by: Julius Volz <[email protected]>
Co-authored-by: Even Rouault <[email protected]>
Co-authored-by: Arvid Norberg <[email protected]>
Co-authored-by: Michael Niedermayer <[email protected]>
Co-authored-by: Julien Pivotto <[email protected]>
Co-authored-by: Ingo Berg <[email protected]>
Co-authored-by: Teju Nareddy <[email protected]>
Co-authored-by: Jamie Pinheiro <[email protected]>
Co-authored-by: Jamie Pinheiro <[email protected]>
Co-authored-by: Nathan Moinvaziri <[email protected]>
Co-authored-by: Mihai Maruseac <[email protected]>
@inferno-chromium
Copy link
Collaborator

@bluca - just fyi, libzmq build is failing https://oss-fuzz-build-logs.storage.googleapis.com/index.html#libzmq because when check_build runs the fuzz targets, they create lot of junk/temporary files in that dir and then zip operation to create build archive fails. This seems bad, fuzz targets should clean their temp files before exit or ideally just operate on data in memory, can you please fix that, that will fix the build archiving.

tep #44:   adding: ^B
Step #44: 	zip warning: could not open for reading: ^B
Step #44:   adding: ^B^A
Step #44: 	zip warning: could not open for reading: ^B^A
Step #44:   adding: ^B^B�^C^B^B^B
Step #44: 	zip warning: could not open for reading: ^B^B�^C^B^B^B

@bluca
Copy link
Contributor Author

bluca commented Jun 6, 2020

@inferno-chromium strange, I'm not sure which files would be created, I'll have a look

@bluca
Copy link
Contributor Author

bluca commented Jun 6, 2020

there are no files created by the tests, I'm really not sure what the ci is complaining about

@bluca
Copy link
Contributor Author

bluca commented Jun 6, 2020

corpora for the tests is built and installed alongside the binaries, as the documentation suggests - could that be the problem?

@bluca
Copy link
Contributor Author

bluca commented Jun 6, 2020

same for dictionaries

@inferno-chromium
Copy link
Collaborator

@bluca - i looked more and found that this fuzzer is the issue

python infra/helper.py build_fuzzers libzmq
python infra/helper.py shell libzmq
cd /out
./test_bind_fuzzer -dict=test_bind_fuzzer.dict

ctrl+c after a 10-20 sec,
see ton of bad files in /out

root@3ed60d06b5e6:/out# ls
?                                 ::::::::::*:::::::;::::::         :::u%p  endpoint.dict                           test_connect_curve_fuzzer                  ~
?                                 :::::::::::::::?                  ::u%%p  instrumented_libraries                  test_connect_curve_fuzzer.dict             ?
?                                 ::::::::::::::::::0::::::::::j    :j      p%                                      test_connect_curve_fuzzer_seed_corpus.zip  ??
!?                                ::::::::::::::::::::$             :wwww   p:                                      test_connect_fuzzer                        ??cy:p:
%:`::p                            :::::::::::::::::::::::::         :z      test_bind_curve_fuzzer                  test_connect_fuzzer.dict                   ?????
:                                 :::::::::::::::::::::::::::::::j  ;       test_bind_curve_fuzzer.dict             test_connect_null_fuzzer                   ?????????????:j
:'                                :::::::::::::::::::::::::::::j    A:j     test_bind_curve_fuzzer_seed_corpus.zip  test_connect_null_fuzzer.dict              ??????????????
::                                :::::::::::::::::::::`:::::::j    S:      test_bind_fuzzer                        test_connect_null_fuzzer_seed_corpus.zip   ????????????????????????????:j
::1:`:\                           ::::::::::??:::::::::::::::::j    \::     test_bind_fuzzer.dict                   test_z85_decode_fuzzer
::::::::*::::::::::::::::::::::j  ::::::::::??:::::::::\:::::::j    `%p.    test_bind_null_fuzzer                   u+:
::::::::::*::::::::::::::         ::::::::`::::::?                  c:      test_bind_null_fuzzer.dict              z:
::::::::::*:::::::;::::8:         ::::`??????                       ci?     test_bind_null_fuzzer_seed_corpus.zip   zmtp.dict

@bluca
Copy link
Contributor Author

bluca commented Jun 7, 2020

Ah, I see: it's socket files. Thanks to the dict, the test is interpreting the input as AF_UNIX paths, so socket files are created. I'll change the test so that they go into an ephemeral directory. Thanks for pointing this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants