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

Chapter-04/Recipe-05 in the book says it was tested on Windows, but valgrind does not work in a Windows environment #505

Open
tjwrona opened this issue Feb 7, 2019 · 4 comments

Comments

@tjwrona
Copy link

tjwrona commented Feb 7, 2019

I attempted to compile and test this example on a Windows PC, but ran into issues because I can't find a feasible way to get valgrind in a Windows environment. After searching the internet it looks like it is simply not supported for Windows.

Expected Behavior

I would expect there to be a working example for Windows as well (Maybe using a different tool other than valgrind).

Current Behavior

There is no working example for Windows.

Possible Solution

Having a working example with a different tool other than valgrind for Windows would be helpful

Your Environment

Windows 7
Visual Studio 2017

@bast
Copy link
Member

bast commented Feb 7, 2019

Thanks for reporting. It is true that we have tested this also on Windows but one unfortunate thing is that the configuration will not complain if Valgrind is not found and I did not see that earlier.

I will think about alternatives - my initial thought was to go for the AddressSanitizer but also there you are out of luck on Windows: https://github.com/google/sanitizers/wiki/AddressSanitizer

@TheErk
Copy link
Collaborator

TheErk commented Feb 8, 2019

I think it should work with recent clang WIndows version (clang 8 or 9 a.k.a. trunk)
https://clang.llvm.org/docs/AddressSanitizer.html

Some snapshot build of Clang for Windows are available there:
https://llvm.org/builds/

On linux + cmake I do use those helpers:
https://github.com/arsenm/sanitizers-cmake

which makes it easier to use with CMake.
I have no windows box at hand (and I don't want to :-) so I cannot help much but I can review the code and test it on Linux.

@tjwrona
Copy link
Author

tjwrona commented Feb 8, 2019

Thanks for the advice! I am really enjoying this book by the way. It is so hard to find good information on CMake anywhere!

There's so many outdated examples on the internet that I always feel like I have to sift through a steaming pile of garbage to learn anything useful...

@bast
Copy link
Member

bast commented Feb 8, 2019

Thank you for the kind feedback - really nice to hear that the material is useful.

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

3 participants