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

Backport ASAN build fixes from rustls-ffi #10

Merged
merged 3 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .github/workflows/libssl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,22 @@ jobs:
with:
toolchain: ${{ matrix.rust }}

- run: make PROFILE=release test
- run: make PROFILE=release integration
- run: make PROFILE=debug test
- run: make PROFILE=debug integration
# Note: we only check the client/server binaries here, assuming that
# is sufficient for any other test binaries.
- name: Verify debug builds were using ASAN
run: |
nm target/client | grep '__asan_init'
nm target/server | grep '__asan_init'
- name: Build release binaries
run: |
make clean
make PROFILE=release
- name: Verify release builds were not using ASAN
run: |
nm target/client | grep -v '__asan_init'
nm target/server | grep -v '__asan_init'

valgrind:
name: Valgrind
Expand All @@ -55,7 +69,7 @@ jobs:
run: sudo apt-get update && sudo apt-get install -y valgrind
- name: Install build dependencies
run: sudo apt-get update && sudo apt-get install -y openssl libssl3 libssl-dev lld
- run: VALGRIND="valgrind -q" make test integration
- run: VALGRIND="valgrind -q" make PROFILE=release test integration

docs:
name: Check for documentation errors
Expand Down
4 changes: 2 additions & 2 deletions rustls-libssl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ CARGOFLAGS += --locked
CFLAGS := -Werror -Wall -Wextra -Wpedantic -g $(shell pkg-config --cflags openssl)
PROFILE := debug

ifeq ($(CC), clang)
ifeq ($(PROFILE), debug)
CFLAGS += -fsanitize=address -fsanitize=undefined
LDFLAGS += -fsanitize=address
LDFLAGS += -fsanitize=address -fsanitize=undefined
endif

ifeq ($(PROFILE), release)
Expand Down