-1

I'm trying to compile a simple test project with Intel C\C++ compiler on Visual Studio 2013.

I have coded this test on linux, where gcc compiles the code without any error, and the application runs fine, but intel compiler on VS 2013 returns me these errors

ID      Type                            Sources     Modules     Object Size State
P1      Unhandled application exception source.c    MyTest.exe              Not fixed
P2      Memory leak                     source.c    MyTest.exe  23984       New
P3      Memory leak                     source.c    MyTest.exe  19980008    New
P4      Invalid memory access           source.c    MyTest.exe              Not fixed
P5      Invalid memory access           source.c    MyTest.exe              Not fixed
P6      Uninitialized memory access     source.c    MyTest.exe              Not fixed

This seems caused by the fact I don't deallocate some previous allocated memory blocks... since this is a test application and I don't want to spend time finding what missed deallocation causes the issue, I'm wondering if there is a way to lower the intel compiler "severity" so that it can ignore these issues (as does gcc).

AndreaF
  • 11,975
  • 27
  • 102
  • 168

1 Answers1

0

Memory Leak you can probably ignore if this is just a test-app.

However, how do you justify accessing Uninitalized Memory (P6), Invalid Memory Access (P4, P5) and Unhandled Exceptions (P1)??

Those seem rather serious to me, even for a test-app.

abelenky
  • 63,815
  • 23
  • 109
  • 159
  • but the program have a predefined input and on linux gcc compile and program complete the execution without any error. Whit a serous problem neither in linux with gcc the program could compile and run – AndreaF Jun 30 '14 at 22:15
  • If you have Uninitialized Memory and Invalid Access, your program *may* run OK this time, and *may* fail completely the next time. It is [**Undefined Behavior**](http://en.wikipedia.org/wiki/Undefined_behavior) – abelenky Jun 30 '14 at 22:17
  • I have run this code on linux at least 100 times for performance evaluation without any crash... sounds pretty strange. In addition if the input is always the same and the routine does always the same thing, the behaviour is not so *undefined* – AndreaF Jun 30 '14 at 22:20
  • 1
    Running successfully 100 times doesn't guarantee anything. Behavior may be different on other CPUs, other operating systems, or when you change the variables and functions in the program. – nobody Jun 30 '14 at 22:59
  • as I have said this is a test, it's not important to run on different PC. code do only some matrix operations on the same preloaded matrices. if the latest gcc version doesn't care about these problems I don't see any reason to take care of this, I know that if Intel compiled code during the execution returns these errors, probably there is something unperfect, for this reason I have asked for a way to lower the error check. If the code is too broken to perform also a base test, gcc doesn't compile and also if compile, should crash at runtime. – AndreaF Jul 01 '14 at 00:25
  • Andrea: Look, you posted a question here, and you have multiple experts telling you that you have serious problems that need to be addressed, and are not at all difficult to address. If you want to ignore our advice, that's your choice. – abelenky Jul 01 '14 at 02:47