Sanitizing C++ Python Modules

Python has great interoperability with C and C++ through extension modules. There are many reasons to do this, such as improving performance, accessing APIs not exposed by the language, or interfacing with libraries written in C or C++. Unlike Python however, C and C++ are not memory safe. Luckily, great tools exist to help diagnose these kind of issues. One of those tools is ASan (Address Sanitizer) which uses compiler instrumentation to detect memory errors at runtime....

<span title='2019-12-20 21:00:00 +0000 UTC'>December 20, 2019</span>

Calling Into C or C++ Code From Python

Recently I wanted to call some C code from Python to check who was sending a particular signal. Apparently this functionality is only available as of Python 3 so I decided to write a custom module. Doing so is relatively easy but all the documentation I found only was usingdistutils to build the module and skipped over how to find the newly builtmodule. This post is mostly a write up of what I found out....

<span title='2018-12-05 21:00:17 +0000 UTC'>December 5, 2018</span>

A better YouCompleteMe Config

If you’re like me and have (1) been using Vim for a while and (2) have been programming in C++, you’ve likely heard about YouCompleteMe. YCM is an awesome auto-completion engine for Vim. For C++ and other C-based languages it uses the libclang under the hood, but it integrates with other engines as well to support C#, Python and Go to name a few. If you’re not yet convinced, check out the author’s website and this blog post....

<span title='2015-07-26 15:45:00 +0000 UTC'>July 26, 2015</span>