We develop a console application using VC 6.0, Purify, PC-Lint, and Quantify on Windows XP. VC6 will not work on Windows 7 and 8. I have looked at our options for development environments if we were to upgrade to Windows 8. Our application is standard C++ console application. Virtually all of our users are on Linux. Does anyone have experience with VC++ Pro 2013 or 2012 for cross platform c++ development? Specifically, can it do memory bounds checking, memory leak checking, and code performance analysis (how much time each function takes)?
Can visual c++ 2013 do what Purify and Quntify do?
1.6k views Asked by user3210062 At
1
There are 1 answers
Related Questions in C++
- Add additional fields to Linq group by
- couldn't copy pdb file to another directory while consuming wcf web service
- Why are the aliases for string and object in lowercase?
- WPF MessageBox Cancel checkbox check
- Resolve object using DI container with object instance
- Creating a parametrized field name for a SELECT clause
- Does compiler optimize operation on const variable and literal const number?
- Get data from one form to another form in C#
- Writing/Overwriting to specific XML file from ASP.NET code behind
- Deleting Orphans with Fluent NHibernate
Related Questions in VISUAL-STUDIO-2013
- Add additional fields to Linq group by
- couldn't copy pdb file to another directory while consuming wcf web service
- Why are the aliases for string and object in lowercase?
- WPF MessageBox Cancel checkbox check
- Resolve object using DI container with object instance
- Creating a parametrized field name for a SELECT clause
- Does compiler optimize operation on const variable and literal const number?
- Get data from one form to another form in C#
- Writing/Overwriting to specific XML file from ASP.NET code behind
- Deleting Orphans with Fluent NHibernate
Related Questions in PURIFY
- Add additional fields to Linq group by
- couldn't copy pdb file to another directory while consuming wcf web service
- Why are the aliases for string and object in lowercase?
- WPF MessageBox Cancel checkbox check
- Resolve object using DI container with object instance
- Creating a parametrized field name for a SELECT clause
- Does compiler optimize operation on const variable and literal const number?
- Get data from one form to another form in C#
- Writing/Overwriting to specific XML file from ASP.NET code behind
- Deleting Orphans with Fluent NHibernate
Related Questions in QUANTIFY
- Add additional fields to Linq group by
- couldn't copy pdb file to another directory while consuming wcf web service
- Why are the aliases for string and object in lowercase?
- WPF MessageBox Cancel checkbox check
- Resolve object using DI container with object instance
- Creating a parametrized field name for a SELECT clause
- Does compiler optimize operation on const variable and literal const number?
- Get data from one form to another form in C#
- Writing/Overwriting to specific XML file from ASP.NET code behind
- Deleting Orphans with Fluent NHibernate
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Well, its not so much "can one do everything the other does". Its more like an intersection, and use them all to get the most coverage.
Purify is a runtime checker, so it will usually outperform Visual Studio's built-in memory checking facilities. But Purify does not do static analysis, so you will need to use Visual Studio. Its one big partnership.
The Bike Shedding begins... This is a great opportunity since you are writing portable code. So many folks write code that runs on one platform, they loose the diagnostics from other tools on other platforms.
Everything below is free (except Enterprise Code Analysis under Visual Studio Enterprise), and if you can get through the process cleanly then you'll have fairly solid code.
Windows
Use Visual Studio (any edition) and turn up warnings. They include
/WAll
and/W4
. If you have Visual Studio Enterprise, be sure to add Enterprise Code Analysis or add the/analyze
switch.You get basic memory checking in Visual Studio. I'm not sure how the latest Purity works with it. (I don't use it because I write cross-platform code and use Linux for the heavy duty memory checking).
There's other things you should be doing for a Windows platform. You can find a discussion of development toolchains at OWASP's C-Based Toolchain Hardening.
Linux
Be sure to support GCC, Clang, and ICC. When using them be sure to crank up warnings, including
-Wall
,-Wextra
, and-Wconversion
. GCC is the mainstay, and your code probably works well on it. ICC is Intel's compiler, and its ruthless about removing undefined behavior. If your code breaks under ICC, its probably because the compiler/optimizer removed some undefined behavior (see Clang's undefined sanitizer below on how to locate the offending code).Clang 3.3 really shines with its sanitizers (Clang 3.2 and below don't have them). Be sure to run with
-fsanitize=address
and-fsanitize=undefined
. The sanitizers add runtime checkers and looks for violations during execution. The more self tests you have, the better. A complete list of sanitizers is available a Clang's Controlling Code Generation.The Clang 3.3 recipes are below. They include how to fetch Clang, hot to build Clang, and how to execute your tests using the santizers.
After you get through compilation with GCC, Clang, and ICC, run the program under Valgrind. Valgrind is another dynamic memory checker.
There's other things you should be doing for a Linux platform. You can find a discussion of development toolchains at OWASP's C-Based Toolchain Hardening.
To download and build Clang 3.3 with the latest:
To use Clang:
If you get any memory issue it will look similar to the following (taken from Squid 3.3.9 Self Test Failures on Mac OS X 10.8):
And here's what undefined behavior and an illegal shift looks like (taken from Postgres's Clang 3.3 findings and Illegal Shifts):
If you are failing under Intel's ICC, then be sure to run it under Clang with
-fsanitize=undefined
because ICC will silently remove any offending code. Its the easiest way I've found to find the offending code.