mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-14 00:00:13 +02:00
Bytes is a useful tool for managing multiple slices into the same region of memory, and the other things it used to have been removed to reduce complexity. The exact strategy for managing the multiple references is no longer hard-coded, but instead backing by a customizable vtable. - Removed ability to mutate the underlying memory from the `Bytes` type. - Removed the "inline" (SBO) mechanism in `Bytes`. The reduces a large amount of complexity, and improves performance when accessing the slice of bytes, since a branch is no longer needed to check if the data is inline. - Removed `Bytes` knowledge of `BytesMut` (`BytesMut` may grow that knowledge back at a future point.)
27 lines
768 B
YAML
27 lines
768 B
YAML
jobs:
|
|
- job: ${{ parameters.name }}
|
|
displayName: TSAN
|
|
pool:
|
|
vmImage: ubuntu-16.04
|
|
|
|
steps:
|
|
- template: azure-install-rust.yml
|
|
parameters:
|
|
rust_version: ${{ parameters.rust_version }}
|
|
|
|
- script: |
|
|
set -e
|
|
|
|
export RUST_TEST_THREADS=1
|
|
export ASAN_OPTIONS="detect_odr_violation=0 detect_leaks=0"
|
|
export TSAN_OPTIONS="suppressions=`pwd`/ci/tsan"
|
|
|
|
# Run address sanitizer
|
|
RUSTFLAGS="-Z sanitizer=address" \
|
|
cargo test --target x86_64-unknown-linux-gnu --test test_bytes --test test_buf --test test_buf_mut
|
|
|
|
# Run thread sanitizer
|
|
RUSTFLAGS="-Z sanitizer=thread" \
|
|
cargo test --target x86_64-unknown-linux-gnu --test test_bytes --test test_buf --test test_buf_mut
|
|
displayName: TSAN / MSAN
|