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

doctest_discover_tests fails with ASAN on Windows #836

Open
bifurcation opened this issue Dec 13, 2023 · 1 comment
Open

doctest_discover_tests fails with ASAN on Windows #836

bifurcation opened this issue Dec 13, 2023 · 1 comment

Comments

@bifurcation
Copy link

bifurcation commented Dec 13, 2023

Description

The doctest_discover_tests CMake function runs a test binary to discover tests and add them to CTest.

When the test binary is built with ASAN on Windows (/fsanitize=address), this invocation of the test binary fails. Based on the error code, it seems that the test binary is not able to find the ASAN libraries when launched in this way.

Steps to reproduce

I have made a small example case in this git repo:
https://github.com/bifurcation/doctest-fail

See, for example, this CI run:
https://github.com/bifurcation/doctest-fail/actions/runs/7201754266/job/19618531004

Extra information

  • doctest version: v2.4.8 (latest in vcpkg) or v2.4.11 (latest)
  • Operating System: Windows Server 2022
  • Compiler+version: Microsoft Visual C++ 14.38.33130

That is, the problems shows up on a windows-latest GitHub actions runner

@vasil-pashov
Copy link

I've encountered similar issue with gtest and I'm 99% sure that the issue with doctest is the same. The problem (with gtest at least) is that it can't find ASAN's DLL. You can copy all required DLLs via custom command in CMake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants