- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Attached is a simple file that demonstrate two failures discovered when running SSA:
- SSA failed to detect the memory leak caused by failure to call fclose(). In real code, this would cause a loss of resources (memory and file handles) which would eventually cause a failure.
- SSA gives the following error, which appears to be a false positive:
Error 12038: illegal value passed to "fopen_s" in argument 3
I would also like to report a missing option in the on-line documentation. Under Compiler Option Descriptions, the -Qdiag-file option is missing.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apparently, you're discussing mainly Inspector XE. That's another forum.
icl -help
.....
/Qdiag-file[:]
where diagnostics are emitted to. Not specifying this causes
messages to be output to stderr
.....
C:\Program Files (x86)\Intel\ComposerXE-2011\Documentation\en_US\compiler_c\cl\index.htm
.....
icl -help
.....
/Qdiag-file[:
messages to be output to stderr
.....
C:\Program Files (x86)\Intel\ComposerXE-2011\Documentation\en_US\compiler_c\cl\index.htm
.....
diag-file, Qdiag-file
Causes the results of diagnostic analysis to be output to a file.
........
I think you'd have to state more explicitly what is missing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To view the SSA result you need the Inspector XE. To generate the SSA data, you use the Composer XE.
Let me see if we can duplicate the issue here. Thanks for reporting it with a testcase.
Jennifer
Let me see if we can duplicate the issue here. Thanks for reporting it with a testcase.
Jennifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regarding your point #1 -- no software can be smart enough to detect your intent.
Maybe you left the file open on purpose?
Maybe handle is to a console input or output and should not be closed?
Maybe file pointer is a global variable and you close the file elsewhere?
Since this particular function with missing fclose() is called only once, not doing an explicit fclose() before the program end is not a catastrophic error -- C runtime will close all open handles on exit anyway so there will be no resource leak. If you called it inside of a loop, then not detecting missing fclose() would be a serious issue.
Maybe you left the file open on purpose?
Maybe handle is to a console input or output and should not be closed?
Maybe file pointer is a global variable and you close the file elsewhere?
Since this particular function with missing fclose() is called only once, not doing an explicit fclose() before the program end is not a catastrophic error -- C runtime will close all open handles on exit anyway so there will be no resource leak. If you called it inside of a loop, then not detecting missing fclose() would be a serious issue.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page