Skip to content

Conversation

@cpu
Copy link
Member

@cpu cpu commented Oct 29, 2024

ci: remove NASM install for Windows/aws-lc-rs

Rustls switched aws-lc-rs to use the prebuilt-nasm feature in Rustls 0.23.16+ This means we no longer need to install NASM in the Windows CI workflows that use aws-lc-rs.

build Windows debug client/server with ASAN

This commit updates the tests/CMakeLists.txt configuration for building the client/server examples on Windows to enable address sanitizer (ASAN). We were already doing this for Linux and MacOS builds but were missing Windows coverage.

Notably this requires a modern MSVC configured on the $PATH at runtime so that the ASAN DLLs are present. Otherwise the built binaries cryptically exit immediately with no output, just the exit status -1073741515. We use the setup-msvc-dev action in CI to do this for us (but only for the debug profile workflows).

You can confirm that ASAN is being used in the output of a debug build where we see a new warning:

LINK : warning LNK4300: ignoring '/INCREMENTAL' because input module contains ASAN metadata [D:\a\rustls-ffi\rustls-ffi\build\tests\server.vcxproj]

See the Microsoft ASAN documentation for more information.

cpu added 2 commits October 29, 2024 14:20
Rustls switched to `aws-lc-rs` to use the `prebuilt-nasm` in Rustls
0.23.16+ This means we no longer need to install NASM in the Windows CI
workflows that use aws-lc-rs.
This commit updates the `tests/CMakeLists.txt` configuration for
building the client/server examples on Windows to enable address
sanitizer (ASAN). We were already doing this for Linux and MacOS builds
but were missing Windows coverage.

Notably this requires a modern MSVC configured on the $PATH at runtime
so that the ASAN DLLs are present. Otherwise the built binaries
cryptically exit immediately with no output, just the exit status
-1073741515. We use the setup-msvc-dev action in CI to do this for us.

See the Microsoft documentation for more information:
https://devblogs.microsoft.com/cppblog/addresssanitizer-asan-for-windows-with-msvc/#compiling-with-asan-from-the-console
@cpu cpu requested a review from ctz October 29, 2024 18:39
@cpu cpu mentioned this pull request Oct 29, 2024
@cpu cpu merged commit 4c98260 into rustls:main Oct 29, 2024
@cpu cpu deleted the cpu-win-cmake-asan branch October 29, 2024 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants