Address sanitizer ignorelist not working with visual studio 2019

Pradeep K 1 Reputation point
2023-01-05T17:06:52.303+00:00

I'm trying to use address-sanitizer with visual studio 2019 (version 16.9.2).
I would like to ignore some of the errors generated by address-sanitizer as they are emitted from external libraries.
When I use /fsanitize-ignorelist=D:\asan_blacklist.txt in
Configuration Properties->C/C++->Command Line->Additional Options
/fsanitize-ignorelist=D:\asan_blacklist.txt
Then I get following error message
command line warning D9002: ignoring unknown option '/fsanitize-ignorelist=D:\asan_blacklist.txt'

I've also tried /fsanitize-blacklist=D:\asan_blacklist.txt option but no luck.

Developer technologies | C++
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. YujianYao-MSFT 4,296 Reputation points Microsoft External Staff
    2023-01-06T07:37:59.793+00:00

    Hi @Pradeep K .

    I suggest you try to use /fsanitize-ignorelist through the developer command prompt, you can refer to the method in this document on how to use it.

    It is worth mentioning that you need to use the cd command to enter the file directory where .cpp is located.

    Best regards,

    Elya


    If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.