What If Your NIF Goes Adrift?

Julian Squires
Eccentric layabout and developer @ AdGear

So, you've decided to use a NIF, to talk to a library or to do some heavy lifting, but something goes wrong. How do you track down a problem with a NIF? How do you test it? How could you fuzz it? This talk will present niffy, a NIF testing harness, as an alternative to building a valgrind-enabled OTP, and will discuss some of the ups and and downs of maintaining NIFs.

Talk objectives:

First, to encourage people not to write NIFs if they can avoid it. Then, to convey some approaches for validating the behavior of NIFs, with a focus on niffy, a simple NIF testing harness I am working on which makes it easier to test some NIFs under tools such as valgrind. I'm hoping to cover or at least touch on detecting memory leaks, profiling, and property testing of NIFs (from the Erlang side and from outside with niffy).

Target audience:

Developers maintaining NIFs or considering using them.


Julian worked in CORBA and distributed middleware before converting to the cult of Erlang for distributed systems, with a foray along the way into financial systems. He now works on real-time bidding systems at AdGear Technologies.

GitHub: tokenrove

Twitter: @tokenrove

Back to conference page