Reputation: 430
I've created an application in VC++ 2010 Express and i wanted to see what would a search for strings reveal about my executable. I saw a lot of strings as expected but what caught my attention is that i saw the exact location of the .pdb file that VS produces for every project.
C:\Users\...\myapp\Debug\myapp.pdb
That one really bothers me because i dont think that this much information(my username for example) should be revealed. Apart from that i also saw a lot of error messages like
Stack memory around _alloca was corrupted
A local variable was used before it was initialized
Stack memory was corrupted
A cast to a smaller data type has caused a loss of data. If this was intentional, you should mask the source of the cast with the appropriate bitmask. For example:
char c = (i & 0xFF);
Changing the code in this way will not affect the quality of the resulting optimized code.
The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
Stack around the variable ' ' was corrupted.
The variable ' ' is being used without being initialized.
I don't really understand why they show up(my programm works fine,none of them applies) but i guess i could live with that. My question is how can i avoid that kind of data(especially as i said the pdb location) showing up?I tried finding something in the project properties but without success.
Upvotes: 0
Views: 149
Reputation: 180050
The first option you want is /PDBALTPATH:%_PDB%
- this keeps the PDB name but drops its path.
The error messages are caused by the default options /GS
and /RTC
. The latter isn't default for release builds, though. /GS-
would turn the first one off, but that's a security risk.
Upvotes: 1