Showing posts with label Visual Studio. Show all posts
Showing posts with label Visual Studio. Show all posts

Wednesday, August 19, 2015

Debugging memory errors using Application Verifier

Debugging memory management errors

Few days ago, one of my applications started crashing both on Linux and Windows because of a memory corruption. Many tools are available to debug such issues; I usually use the open source valgrind on Linux, while I prefer instrumentation based tools on Windows.
But the application I had to debug was so large that the instrumentation based tools either failed to instrument it or succeeded in instrumenting the binary but then failed quite soon at runtime. Valgrind was successful in running my application, but generated such a large number of false positives that it was really difficult to locate the source of the error I was interested at.
I finally found information about Application Verifier and tried it for the first time: and it was really successful in helping me finding the memory issue, by pinpointing the line of code that executed the wrong memory access.
The reminder of this article shows how to use Application Verifier to debug memory issues, using a simple example.

Sunday, July 26, 2015

Adding ssh support to the Visual Studio 2015 Git plug-in

Some background


Visual Studio 2015 includes a Git plug-in that allows to version control software using Git. The plug-in allows to publish/clone from a shared Git repository, but is currently limited to repositories that support the http/https protocol.

Many users are requesting support for the ssh protocol, but the requirement is still under evaluation:
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3801342-add-support-for-ssh-keys-as-alternate-authenticati

Anyhow the plug-in is based on libgit2, which optionally supports the ssh protocol. The next section describes how to rebuild libgit2 in order to enable ssh support.