From 3988137ac61e0b1a61b07fcde5c11b06f00aae1d Mon Sep 17 00:00:00 2001 From: Niyati Maheshwari Date: Fri, 11 Feb 2022 15:08:26 -0800 Subject: [PATCH] GitHub actions setup (#1390) * add additional tests * fix syntax error * fix syntax error * fix syntax error * fix syntax error * fix syntax error * static build and msan without docker * fix msan * use dependencies with msan build * use gcc 9 for mac * use gcc 4.2 for mac gcc build * use gcc 4.9 for mac gcc build * check gcc version; use macos 10.15 * use clang-7 for ubsan * arm cross compilation * missed cloning the repository * use gcc * remove compiler from env * fix install deps * use clang7, macos10.15, ubuntu18.04 * fix windows build * fix test instruction * fix static build * fix static build * fix static build * fix static build * setup docker for static build * use alpine for the static build * use alpine for the static build * install dependencies * install dependencies * fix errors in static build * install dependencies * enable ipv6 * use gcc for static build * fix ubsan * fix ubsan * collate all working github actions builds * fix errors * have static,msan,windows,doxygen in travis * comment failing builds;fix ci rules * fix travis comments, os, remove exports * update log level, mac build-name * add CC * update gcc * update gcc * check cc and cxx for mac gcc * Revert "check cc and cxx for mac gcc" This reverts commit 2db1e0e4b7a9291a389cbae0f3793edd7f88c7ae. * remove travis statement --- .github/build_windows.bat | 2 +- .github/workflows/ci.yml | 345 ++++++++++++++++++++++++---------- .travis.yml | 103 +++------- src/source/Signaling/Client.c | 4 +- 4 files changed, 275 insertions(+), 179 deletions(-) diff --git a/.github/build_windows.bat b/.github/build_windows.bat index 17c70858c6..66fc5f2093 100644 --- a/.github/build_windows.bat +++ b/.github/build_windows.bat @@ -1,4 +1,4 @@ -call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvars64.bat" +call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvars64.bat" amd64 mkdir build cd build cmd.exe /c cmake -G "NMake Makefiles" .. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e20f23ceb4..718df8a07e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ on: - master jobs: clang-format-check: - runs-on: macos-11 + runs-on: macos-latest steps: - name: Clone repository uses: actions/checkout@v2 @@ -22,169 +22,318 @@ jobs: - name: Run clang format check run: | bash scripts/check-clang.sh - - ubuntu-os-build: - runs-on: ubuntu-latest + mac-os-build-clang: + runs-on: macos-latest + env: + CC: /usr/bin/clang + CXX: /usr/bin/clang++ + AWS_KVS_LOG_LEVEL: 2 steps: - name: Clone repository uses: actions/checkout@v2 - name: Build repository run: | - # TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891. - sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' - mkdir build - cd build - cmake .. -DBUILD_TEST=TRUE + mkdir build && cd build + sh -c 'cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE;cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE' make - export AWS_KVS_LOG_LEVEL=3 ./tst/webrtc_client_test - - address-sanitizer: - runs-on: ubuntu-18.04 + mac-os-build-gcc: + runs-on: macos-10.15 env: - ASAN_OPTIONS: detect_odr_violation=0:detect_leaks=1 - LSAN_OPTIONS: suppressions=../tst/suppressions/LSAN.supp - CC: /usr/bin/clang - CXX: /usr/bin/clang++ + CC: gcc + CXX: g++ + AWS_KVS_LOG_LEVEL: 2 steps: - name: Clone repository uses: actions/checkout@v2 - - name: Build repository + - name: Build repository and run all tests without auth run: | - # TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891. - sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' - mkdir build - cd build - cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TEST=TRUE -DADDRESS_SANITIZER=TRUE + mkdir build && cd build + sh -c 'cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE;cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE' make - export AWS_KVS_LOG_LEVEL=3 - ulimit -c unlimited -S - timeout --signal=SIGABRT 60m ./tst/webrtc_client_test - - thread-sanitizer: + ./tst/webrtc_client_test + unset AWS_ACCESS_KEY_ID + unset AWS_SECRET_ACCESS_KEY + ./tst/webrtc_client_test --gtest_break_on_failure --gtest_filter="SignalingApiFunctionalityTest.*:SignalingApiTest.*:TurnConnectionFunctionalityTest.*" + linux-gcc-code-coverage: runs-on: ubuntu-18.04 env: - TSAN_OPTIONS: halt_on_error=1:suppressions=../tst/suppressions/TSAN.supp - CC: /usr/bin/clang - CXX: /usr/bin/clang++ + AWS_KVS_LOG_LEVEL: 2 steps: - name: Clone repository uses: actions/checkout@v2 - name: Build repository run: | sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' - mkdir build - cd build - cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TEST=TRUE -DTHREAD_SANITIZER=TRUE + mkdir build && cd build + cmake .. -DCODE_COVERAGE=TRUE -DBUILD_TEST=TRUE make - export AWS_KVS_LOG_LEVEL=3 ulimit -c unlimited -S timeout --signal=SIGABRT 60m ./tst/webrtc_client_test - - mbedtls-ubuntu-clang: - runs-on: ubuntu-latest + - name: Code coverage + run: | + for test_file in $(find CMakeFiles/kvsWebrtcClient.dir CMakeFiles/kvsWebrtcSignalingClient.dir -name '*.gcno'); do gcov $test_file; done + bash <(curl -s https://codecov.io/bash) + address-sanitizer: + runs-on: ubuntu-18.04 env: - CC: /usr/bin/clang - CXX: /usr/bin/clang++ + ASAN_OPTIONS: detect_odr_violation=0:detect_leaks=1 + LSAN_OPTIONS: suppressions=../tst/suppressions/LSAN.supp + CC: clang-7 + CXX: clang++-7 + AWS_KVS_LOG_LEVEL: 2 steps: - name: Clone repository uses: actions/checkout@v2 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get -y install clang-7 - name: Build repository run: | + # TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891. sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' - mkdir build - cd build - cmake .. -DBUILD_TEST=TRUE -DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON + mkdir build && cd build + cmake .. -DBUILD_TEST=TRUE -DADDRESS_SANITIZER=TRUE make - export AWS_KVS_LOG_LEVEL=3 ulimit -c unlimited -S timeout --signal=SIGABRT 60m ./tst/webrtc_client_test - - sample-check: - runs-on: ubuntu-latest + undefined-behavior-sanitizer: + runs-on: ubuntu-18.04 + env: + UBSAN_OPTIONS: halt_on_error=1 + CC: clang-7 + CXX: clang++-7 + AWS_KVS_LOG_LEVEL: 2 steps: - name: Clone repository uses: actions/checkout@v2 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get -y install clang-7 - name: Build repository run: | + # TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891. sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' - mkdir build - cd build - cmake .. + mkdir build && cd build + cmake .. -DBUILD_TEST=TRUE -DUNDEFINED_BEHAVIOR_SANITIZER=TRUE make - cd .. - ./scripts/check-sample.sh - -# Todo: Fix these builds - - # mac-os-catalina-build: - # runs-on: macos-latest - # env: - # CPATH: "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include" - # steps: - # - name: Clone repository - # uses: actions/checkout@v2 - # - name: Build repository - # run: | - # mkdir build - # cd build - # cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE -DBUILD_OPENSSL_PLATFORM=darwin64-x86_64-cc - # make - # export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:`pwd`/../open-source/lib" - # ./tst/webrtc_client_test - + ulimit -c unlimited -S + timeout --signal=SIGABRT 60m ./tst/webrtc_client_test # memory-sanitizer: - # runs-on: ubuntu-latest + # runs-on: ubuntu-18.04 # env: - # CC: /usr/bin/clang - # CXX: /usr/bin/clang++ + # CC: clang-7 + # CXX: clang++-7 + # AWS_KVS_LOG_LEVEL: 2 # steps: # - name: Clone repository # uses: actions/checkout@v2 + # - name: Install dependencies + # run: | + # sudo apt-get update + # sudo apt-get -y install clang-7 # - name: Build repository # run: | - # mkdir build - # cd build - # cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TEST=TRUE -DMEMORY_SANITIZER=TRUE + # sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' + # mkdir build && cd build + # cmake .. -DMEMORY_SANITIZER=TRUE -DBUILD_TEST=TRUE # make - # export AWS_KVS_LOG_LEVEL=3 # ulimit -c unlimited -S # timeout --signal=SIGABRT 60m ./tst/webrtc_client_test - - - # undefined-behavior-sanitizer: + thread-sanitizer: + runs-on: ubuntu-latest + env: + TSAN_OPTIONS: halt_on_error=1:suppressions=../tst/suppressions/TSAN.supp + CC: clang-7 + CXX: clang++-7 + AWS_KVS_LOG_LEVEL: 2 + steps: + - name: Clone repository + uses: actions/checkout@v2 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get -y install clang-7 + - name: Build repository + run: | + sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' + mkdir build && cd build + cmake .. -DBUILD_TEST=TRUE -DTHREAD_SANITIZER=TRUE + make + ulimit -c unlimited -S + timeout --signal=SIGABRT 60m ./tst/webrtc_client_test + linux-gcc-4_4: + runs-on: ubuntu-18.04 + env: + AWS_KVS_LOG_LEVEL: 2 + CC: gcc-4.4 + steps: + - name: Clone repository + uses: actions/checkout@v2 + - name: Install deps + run: | + sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' + sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test + sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ trusty main' + sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ trusty universe' + sudo apt-get -q update + sudo apt-get -y install gcc-4.4 + sudo apt-get -y install gdb + - name: Build repository + run: | + mkdir build && cd build + cmake .. -DBUILD_TEST=TRUE + make + ulimit -c unlimited -S + timeout --signal=SIGABRT 60m ./tst/webrtc_client_test + # static-build: # runs-on: ubuntu-18.04 + # container: + # image: alpine:latest # env: - # UBSAN_OPTIONS: halt_on_error=1 + # CC: gcc + # CXX: g++ + # AWS_KVS_LOG_LEVEL: 2 # steps: # - name: Clone repository # uses: actions/checkout@v2 + # - name: Install dependencies + # run: | + # apk update + # apk upgrade + # apk add alpine-sdk cmake clang linux-headers perl bash openssl-dev + # - name: Build Repository + # run: | + # mkdir build && cd build + # cmake .. -DBUILD_STATIC_LIBS=TRUE -DBUILD_TEST=TRUE + # make + # ulimit -c unlimited -S + # ../scripts/check-static-build.sh + # ./tst/webrtc_client_test # - name: Build repository # run: | - # # TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891. # sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' - # mkdir build - # cd build - # cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TEST=TRUE -DUNDEFINED_BEHAVIOR_SANITIZER=TRUE + # mkdir build && cd build + # cmake .. -DBUILD_STATIC_LIBS=TRUE -DBUILD_TEST=TRUE # make - # export AWS_KVS_LOG_LEVEL=3 # ulimit -c unlimited -S + # ../scripts/check-static-build.sh # timeout --signal=SIGABRT 60m ./tst/webrtc_client_test - - # windows-build: - # runs-on: windows-latest - # env: - # PATH: "/c/Strawberry/perl/site/bin:/c/Strawberry/perl/bin:/c/Strawberry/c/bin:/c/Program Files/NASM:`pwd`/open-source/lib:`pwd`/open-source/bin:$PATH" + mbedtls-ubuntu-gcc: + runs-on: ubuntu-latest + env: + AWS_KVS_LOG_LEVEL: 2 + steps: + - name: Clone repository + uses: actions/checkout@v2 + - name: Install deps + run: | + sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' + sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test + sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ trusty main' + sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ trusty universe' + sudo apt-get -q update + sudo apt-get -y install gcc-4.4 + sudo apt-get -y install gdb + - name: Build repository + run: | + mkdir build && cd build + cmake .. -DBUILD_TEST=TRUE -DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON + make + ulimit -c unlimited -S + timeout --signal=SIGABRT 60m ./tst/webrtc_client_test + mbedtls-ubuntu-clang: + runs-on: ubuntu-18.04 + env: + CC: clang-7 + CXX: clang++-7 + AWS_KVS_LOG_LEVEL: 2 + steps: + - name: Clone repository + uses: actions/checkout@v2 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get -y install clang-7 + - name: Build repository + run: | + sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' + mkdir build && cd build + cmake .. -DBUILD_TEST=TRUE -DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON + make + ulimit -c unlimited -S + timeout --signal=SIGABRT 60m ./tst/webrtc_client_test + sample-check: + runs-on: ubuntu-latest + env: + AWS_KVS_LOG_LEVEL: 2 + steps: + - name: Clone repository + uses: actions/checkout@v2 + - name: Build repository + run: | + sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' + mkdir build && cd build + cmake .. + make + cd .. + ./scripts/check-sample.sh + ubuntu-os-build: + runs-on: ubuntu-18.04 + env: + AWS_KVS_LOG_LEVEL: 2 + steps: + - name: Clone repository + uses: actions/checkout@v2 + - name: Build repository + run: | + # TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891. + sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' + mkdir build && cd build + cmake .. -DBUILD_TEST=TRUE + make + ./tst/webrtc_client_test + # windows-msvc: + # runs-on: windows-2019 + # permissions: + # id-token: write + # contents: read # steps: + # - name: Setup MSVC + # uses: ilammy/msvc-dev-cmd@v1 # - name: Clone repository # uses: actions/checkout@v2 - # - name: Install deps + # - name: Build and run # run: | # choco install nasm strawberryperl - # - name: Build repository - # run: | - # unset CC CC_FOR_BUILD CXX CXX_FOR_BUILD # We want to use MSVC + # $env:Path += ';C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Strawberry\c\bin;C:\Program Files\NASM;D:\a\amazon-kinesis-video-streams-producer-c\amazon-kinesis-video-streams-producer-c\open-source\lib;D:\a\amazon-kinesis-video-streams-producer-c\amazon-kinesis-video-streams-producer-c\open-source\bin' + # git config --system core.longpaths true # .github/build_windows.bat - # cd build/tst - # ./webrtc_client_test.exe --gtest_filter="-DataChannelFunctionalityTest.*:IceApiTest.*:IceFunctionalityTest.*:PeerConnectionFunctionalityTest.*:SignalingApiFunctionalityTest.*:TurnConnectionFunctionalityTest.*:RtpFunctionalityTest.marshallUnmarshallH264Data:RtpFunctionalityTest.packingUnpackingVerifySameH264Frame:RtcpFunctionalityTest.onRtcpPacketCompound:RtcpFunctionalityTest.twcc3" + # cd tst && .\webrtc_client_test.exe --gtest_filter="-DataChannelFunctionalityTest.*:IceApiTest.*:IceFunctionalityTest.*:PeerConnectionFunctionalityTest.*:SignalingApiFunctionalityTest.*:TurnConnectionFunctionalityTest.*:RtpFunctionalityTest.marshallUnmarshallH264Data:RtpFunctionalityTest.packingUnpackingVerifySameH264Frame:RtcpFunctionalityTest.onRtcpPacketCompound:RtcpFunctionalityTest.twcc3" + arm-cross-compilation: + runs-on: ubuntu-18.04 + env: + CC: arm-linux-gnueabi-gcc + CXX: arm-linux-gnueabi-g++ + AWS_KVS_LOG_LEVEL: 2 + steps: + - name: Set up QEMU + id: qemu + uses: docker/setup-qemu-action@v1 + with: + image: tonistiigi/binfmt:latest + platforms: arm64 + - name: Install dependencies + run: + sudo apt-get -y install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi binutils-arm-linux-gnueabi + - name: Clone repository + uses: actions/checkout@v2 + - name: Build Repository + run: | + sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' + mkdir build && cd build + cmake .. -DBUILD_OPENSSL=TRUE -DBUILD_OPENSSL_PLATFORM=linux-generic32 -DBUILD_LIBSRTP_HOST_PLATFORM=x86_64-unknown-linux-gnu -DBUILD_LIBSRTP_DESTINATION_PLATFORM=arm-unknown-linux-uclibcgnueabi + make diff --git a/.travis.yml b/.travis.yml index 1d1b1d5946..d2fc358e4b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,56 +35,6 @@ matrix: include: - # MacOS Builds - - name: "OSX GCC" - os: osx - compiler: gcc - before_script: - - mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE - script: - - make - - export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:`pwd`/../open-source/lib" - - ./tst/webrtc_client_test - after_failure: skip # timeout not available on MacOS - - - name: "OSX Clang" - os: osx - compiler: clang - before_script: - - mkdir build && cd build && cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE - script: - - make - - export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:`pwd`/../open-source/lib" - - ./tst/webrtc_client_test || travis_terminate 1; - # Execute selected tests without auth integration - - unset AWS_ACCESS_KEY_ID - - unset AWS_SECRET_ACCESS_KEY - - ./tst/webrtc_client_test --gtest_break_on_failure --gtest_filter="SignalingApiFunctionalityTest.*:SignalingApiTest.*:TurnConnectionFunctionalityTest.*" - after_failure: skip # timeout not available on MacOS - - # UndefinedBehaviorSanitizer - - name: "Linux Clang UndefinedBehaviorSanitizer" - os: linux - compiler: clang - env: UBSAN_OPTIONS=halt_on_error=1 - before_install: - # TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891. - - sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' - before_script: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TEST=TRUE -DUNDEFINED_BEHAVIOR_SANITIZER=TRUE - - # Old Version GCC 4.4 - - name: "Linux GCC 4.4 Build" - os: linux - before_install: - # TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891. - - sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo apt-get -q update - - sudo apt-get -y install gcc-4.4 - - sudo apt-get -y install gdb - compiler: gcc - before_script: export CC=gcc-4.4 && mkdir build && cd build && cmake .. -DBUILD_TEST=TRUE - # Static Build - name: "Static Build" before_install: @@ -105,37 +55,32 @@ matrix: - alpine ../scripts/check-static-build.sh || travis_terminate 1 - alpine ./tst/webrtc_client_test after_failure: skip # no coredumps in container - - # Cross-compilation to ARM, no tests are run - - name: "ARM Cross-compilation" - os: linux - addons: - apt: - packages: - - gcc-arm-linux-gnueabi - - g++-arm-linux-gnueabi - - binutils-arm-linux-gnueabi - compiler: gcc + + # MemorySanitizer + - name: "Linux Clang MemorySanitizer" + env: allowTestFail=true before_install: - # TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891. - - sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' - before_script: - - export CC=arm-linux-gnueabi-gcc CXX=arm-linux-gnueabi-g++ - - mkdir build && cd build - - cmake .. -DBUILD_OPENSSL=TRUE -DBUILD_OPENSSL_PLATFORM=linux-generic32 -DBUILD_LIBSRTP_HOST_PLATFORM=x86_64-unknown-linux-gnu -DBUILD_LIBSRTP_DESTINATION_PLATFORM=arm-unknown-linux-uclibcgnueabi - script: make + # TODO: Remove the following 2 lines. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891. + - echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json + - sudo service docker restart + - mkdir build + - docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -w /src/build -dit --name msan-tester -v $(pwd):/src seaduboi/kvs-msan-tester + - msan-tester() { docker exec -it msan-tester "$@"; } + script: + - msan-tester cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_DEPENDENCIES=FALSE -DBUILD_TEST=TRUE -DMEMORY_SANITIZER=TRUE -DCMAKE_CXX_FLAGS="-stdlib=libc++ -L/usr/src/libcxx_msan/lib -lc++abi -I/usr/src/libcxx_msan/include -I/usr/src/libcxx_msan/include/c++/v1 -fsanitize=memory -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize-memory-track-origins" + - msan-tester make + - msan-tester ./tst/webrtc_client_test + after_failure: skip # no coredumps in container - - name: "mbedTLS - Linux GCC 4.4 Build" - os: linux - compiler: gcc - before_install: - # TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891. - - sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo apt-get -q update - - sudo apt-get -y install gcc-4.4 - - sudo apt-get -y install gdb - before_script: mkdir build && cd build && cmake .. -DBUILD_TEST=TRUE -DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON + - name: "Windows MSVC" + env: allowTestFail=true + os: windows + script: + - choco install nasm strawberryperl + - unset CC CC_FOR_BUILD CXX CXX_FOR_BUILD # We want to use MSVC + - export "PATH=/c/Strawberry/perl/site/bin:/c/Strawberry/perl/bin:/c/Strawberry/c/bin:/c/Program Files/NASM:`pwd`/open-source/lib:`pwd`/open-source/bin:$PATH" + - .github/build_windows.bat + - cd build/tst && ./webrtc_client_test.exe --gtest_filter="-DataChannelFunctionalityTest.*:IceApiTest.*:IceFunctionalityTest.*:PeerConnectionFunctionalityTest.*:SignalingApiFunctionalityTest.*:TurnConnectionFunctionalityTest.*:RtpFunctionalityTest.marshallUnmarshallH264Data:RtpFunctionalityTest.packingUnpackingVerifySameH264Frame:RtcpFunctionalityTest.onRtcpPacketCompound:RtcpFunctionalityTest.twcc3" # Generate Doxygen - name: "Generate Doxygen" diff --git a/src/source/Signaling/Client.c b/src/source/Signaling/Client.c index 31f228a3cf..7e54682918 100644 --- a/src/source/Signaling/Client.c +++ b/src/source/Signaling/Client.c @@ -231,7 +231,9 @@ STATUS signalingClientFetchSync(SIGNALING_CLIENT_HANDLE signalingClientHandle) CleanUp: SIGNALING_UPDATE_ERROR_COUNT(pSignalingClient, retStatus); - freeRetryStrategyForCreatingSignalingClient(&pSignalingClient->clientInfo.signalingClientInfo, &createSignalingClientRetryStrategy); + if (pSignalingClient != NULL) { + freeRetryStrategyForCreatingSignalingClient(&pSignalingClient->clientInfo.signalingClientInfo, &createSignalingClientRetryStrategy); + } LEAVES(); return retStatus; }