diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index abbf8326..1c21c7fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,6 +68,10 @@ jobs: shell: bash run: | cd build + # On ubuntu we need to modify memlock limit to allow tests to run + if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then + sudo prlimit --memlock=unlimited --pid=$$ + fi # On macOS, sudo is required to run tests due to LAN access permissions if [[ "${{ matrix.os }}" == "macos-latest" ]]; then sudo ctest -C ${{ matrix.build_type }} --output-on-failure diff --git a/tests/universal/network/pub_sub.cxx b/tests/universal/network/pub_sub.cxx index 6e71d86b..35838fbe 100644 --- a/tests/universal/network/pub_sub.cxx +++ b/tests/universal/network/pub_sub.cxx @@ -38,7 +38,7 @@ class SHMAllocator { const auto len = strlen(data); auto alloc_result = provider.alloc_gc_defrag_blocking(len, AllocAlignment({0})); ZShmMut&& buf = std::get(std::move(alloc_result)); - memcpy(buf.data(), data, len + 1); + memcpy(buf.data(), data, len); return Bytes(std::move(buf)); } };