- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
I am running Intel Fortran 2024.1 on Visual Studio 2022. I would like to compile my code using the address sanitizer but am very confused as to how to do this. I have read the previous posts here as well as the solutions but cannot seem to get it to work. Could someone please point me to instructions on how to compile and link with the sanitizer? I have set Traceback to Yes and "Check:all" for Runtime Error Checking" in the Run-Time tab under Fortran and have disabled Incremental Linking and asked for Full debugging. I am using the IDX compiler and am in Debug x64.
Thank you so much for your help!
David
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The address sanitizer is NOT part of -check all
It has it's own compiler option, and to my knowledge is not yet integrated into the Properties pages. You will have to add this option manually to the Options window in the properties.
/fsanitize=address
Try this option. I am suspicious in the syntax, I would have suspected the syntax to be /fsanitize:address to be more Windows-esque.
I hope this helps. Our documentation on Sanitizers leaves a lot to be desired.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also, the documentation should call out that sanitizers cause a performance degration. Expect a 2x to 5x slower runtime when this santizer is enabled. Thus, not recommended for production code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ron!
Thank you for your reply however it is still not working. I did however follow the link you sent and read that the sanitizer can only detect memory leaks in Linux, not Windows. Is this correct or has things changed since it was first written? I wrote a small test code where I allocated memory of a junk array, indexed it 1 greater that the space allocated and then deallocated it twice! During the run, this error was caught but not with any ASAN remarks?
I also ran my code outside of Visual Studio, in a VS cmd window. I have turned traceback off and error checking to none. I also added the /fsanitize=address to the Command Line in Fortran and Linker.
Am I missing something else?
Thank you so much again! I really appreciate all of the help
Sincerely,
David
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page