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

Add AddressSanitizer #106

Open
FelixLamontagne2 opened this issue Jul 11, 2020 · 2 comments
Open

Add AddressSanitizer #106

FelixLamontagne2 opened this issue Jul 11, 2020 · 2 comments
Assignees
Labels
Backlog Issues that have been prioritised and analysed by the dev team Improvement Improve an already existing feature

Comments

@FelixLamontagne2
Copy link
Member

Context (Environment)

Address Sanitizer (asan) is a tool used to analyse memory usage to detect undefined behaviour (for example use after free). It has been added to MSVC recently so adding it to the codebase is a good idea.

@FelixLamontagne2 FelixLamontagne2 added Backlog Issues that have been prioritised and analysed by the dev team Improvement Improve an already existing feature labels Jul 11, 2020
@FelixLamontagne2 FelixLamontagne2 self-assigned this Jul 12, 2020
@FelixLamontagne2
Copy link
Member Author

FelixLamontagne2 commented Jul 12, 2020

This is going to have to wait until version 16.7, which should be close to be released.
16.6 only supports release x86 so we'll wait for 16.7 since they added x64 and debug

@FelixLamontagne2 FelixLamontagne2 removed their assignment Nov 1, 2020
@FelixLamontagne2 FelixLamontagne2 self-assigned this Mar 7, 2021
@FelixLamontagne2
Copy link
Member Author

FelixLamontagne2 commented Mar 7, 2021

I tried to add ASan to the project, but it currently feels a bit rough on the edges. While it is a good tool and it did work almost seemlessly on smaller projects, it has some conflicts in Throne. I did manage to activate it and run tests, but I had to do a bunch of things that I do not want to commit (for example modifying catch2.hpp). It did not find any errors, which is good news.

I will move this task back to the backlog so we can re-evaluate it in the future.

List of conflicts that I found:

  1. ASan currently does not work with /RTC, but there is no clean way of removing the option /RTC. It currently output a warning only in W4, but with /WX it block compilation.

  2. ASan does not support incremental links.

  3. ASan does not support edit and continue.

  4. The worst part is that it causes a bug in catch2 which prevents the unit tests from properly executing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backlog Issues that have been prioritised and analysed by the dev team Improvement Improve an already existing feature
Projects
None yet
Development

No branches or pull requests

1 participant