forked from boostorg/mqtt5
Add clang 16-18, address and UB sanitizer builds to CI
Summary: related to T15253 Reviewers: ivica Reviewed By: ivica Subscribers: iljazovic, miljen Differential Revision: https://repo.mireo.local/D32168
This commit is contained in:
40
.github/workflows/ci.yml
vendored
40
.github/workflows/ci.yml
vendored
@ -160,19 +160,19 @@ jobs:
|
|||||||
os: ubuntu-24.04
|
os: ubuntu-24.04
|
||||||
container: ubuntu:24.04
|
container: ubuntu:24.04
|
||||||
build-type: 'Release'
|
build-type: 'Release'
|
||||||
cxxstd: 17
|
cxxstd: 20
|
||||||
cxxflags: ''
|
cxxflags: ''
|
||||||
ldflags: ''
|
ldflags: ''
|
||||||
|
|
||||||
- toolset: g++-14
|
- toolset: g++-14 -fsanitize=address,undefined
|
||||||
compiler: g++-14
|
compiler: g++-14
|
||||||
install: g++-14
|
install: g++-14
|
||||||
os: ubuntu-24.04
|
os: ubuntu-24.04
|
||||||
container: ubuntu:24.04
|
container: ubuntu:24.04
|
||||||
build-type: 'Release'
|
build-type: 'Debug'
|
||||||
cxxstd: 20
|
cxxstd: 20
|
||||||
cxxflags: ''
|
cxxflags: '-fsanitize=address,undefined -fno-sanitize-recover=all'
|
||||||
ldflags: ''
|
ldflags: '-fsanitize=address,undefined'
|
||||||
|
|
||||||
- toolset: clang++-12
|
- toolset: clang++-12
|
||||||
compiler: clang++-12
|
compiler: clang++-12
|
||||||
@ -210,10 +210,40 @@ jobs:
|
|||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
container: ubuntu:22.04
|
container: ubuntu:22.04
|
||||||
build-type: 'Release'
|
build-type: 'Release'
|
||||||
|
cxxstd: 17
|
||||||
|
cxxflags: ''
|
||||||
|
ldflags: ''
|
||||||
|
|
||||||
|
- toolset: clang++-16
|
||||||
|
compiler: clang++-16
|
||||||
|
install: clang++-16
|
||||||
|
os: ubuntu-24.04
|
||||||
|
container: ubuntu:24.04
|
||||||
|
build-type: 'Release'
|
||||||
|
cxxstd: 17
|
||||||
|
cxxflags: ''
|
||||||
|
ldflags: ''
|
||||||
|
|
||||||
|
- toolset: clang++-17
|
||||||
|
compiler: clang++-17
|
||||||
|
install: clang++-17
|
||||||
|
os: ubuntu-24.04
|
||||||
|
container: ubuntu:24.04
|
||||||
|
build-type: 'Release'
|
||||||
cxxstd: 20
|
cxxstd: 20
|
||||||
cxxflags: ''
|
cxxflags: ''
|
||||||
ldflags: ''
|
ldflags: ''
|
||||||
|
|
||||||
|
- toolset: clang++-18 -fsanitize=address,undefined
|
||||||
|
compiler: clang++-18
|
||||||
|
install: clang++-18
|
||||||
|
os: ubuntu-24.04
|
||||||
|
container: ubuntu:24.04
|
||||||
|
build-type: 'Debug'
|
||||||
|
cxxstd: 20
|
||||||
|
cxxflags: '-fsanitize=address,undefined -fno-sanitize-recover=all'
|
||||||
|
ldflags: '-fsanitize=address,undefined'
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
container: ${{ matrix.container }}
|
container: ${{ matrix.container }}
|
||||||
env:
|
env:
|
||||||
|
@ -128,7 +128,7 @@ Async.MQTT5 is a header-only library. To use Async.MQTT5 it requires the followi
|
|||||||
- **OpenSSL**. Only if you require an SSL connection by using [boost::asio::ssl::stream](https://www.boost.org/doc/libs/1_82_0/doc/html/boost_asio/reference/ssl__stream.html).
|
- **OpenSSL**. Only if you require an SSL connection by using [boost::asio::ssl::stream](https://www.boost.org/doc/libs/1_82_0/doc/html/boost_asio/reference/ssl__stream.html).
|
||||||
|
|
||||||
Async.MQTT5 has been tested with the following compilers:
|
Async.MQTT5 has been tested with the following compilers:
|
||||||
- clang 12.0 - 15.0 (Linux)
|
- clang 12.0 - 18.0 (Linux)
|
||||||
- GCC 9 - 14 (Linux)
|
- GCC 9 - 14 (Linux)
|
||||||
- MSVC 14.37 - Visual Studio 2022 (Windows)
|
- MSVC 14.37 - Visual Studio 2022 (Windows)
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ To use __Self__ it requires the following:
|
|||||||
|
|
||||||
__Self__ has been tested with the following compilers:
|
__Self__ has been tested with the following compilers:
|
||||||
|
|
||||||
* clang 12.0 - 15.0 (Linux)
|
* clang 12.0 - 18.0 (Linux)
|
||||||
* GCC 9 - 14 (Linux)
|
* GCC 9 - 14 (Linux)
|
||||||
* MSVC 14.37 - Visual Studio 2022 (Windows)
|
* MSVC 14.37 - Visual Studio 2022 (Windows)
|
||||||
|
|
||||||
|
@ -67,6 +67,8 @@ public:
|
|||||||
|
|
||||||
size_t consume(const std::vector<uint8_t>& data) {
|
size_t consume(const std::vector<uint8_t>& data) {
|
||||||
size_t num_bytes = std::min(_buffer_size, data.size());
|
size_t num_bytes = std::min(_buffer_size, data.size());
|
||||||
|
if (num_bytes == 0)
|
||||||
|
return 0;
|
||||||
std::memcpy(_buffer_data, data.data(), num_bytes);
|
std::memcpy(_buffer_data, data.data(), num_bytes);
|
||||||
return num_bytes;
|
return num_bytes;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user