programs. applied.

Patch provides expert programming, training, and consulting services.

Latest blog posts

Bug hunt: Independent functions crashing gcov

NASA reported an odd crash in gcov, and I found it interesting and deep enough to warrant describing the root cause and the path it took me on. The actual crash itself was quickly found with gdb; reading the block.locations.lines when printing the source lines of a path when the array was empty (with size()-1, even!). A fix would be to not do that e.g. by guarding the access, but the question is why the array is empty in the first place.

Trip report: NDC Techtown 2024

This year’s Techtown conference in Kongsberg is through, and I wanted to do a trip report of sorts. There were ~400 attendees, the highest attendance yet, and an all-around fantastic atmosphere. I learnt a lot and had the privilege of striking conversations with many brilliant people, on diverse topics such as language design, compiler development, compiler features, embedded constraints, programming techniques, and I am already excited for next year. The programme was superb and I cannot think of a single slot where which talk to attend was an obvious choice.

Progress report - prime path coverage in gcc 3

The prime path coverage support is shaping up nicely, so I wanted to write a bit about the last series of improvements to the upcoming prime path coverage feature in gcc. gcov reports Path coverage differs from statement, branch, and condition coverage in that coverage ties to the function and not individual lines. This is quite different from how gcov has reported up until now. Furthermore, it is not necessarily easy to look at some code and figure out even what the paths even are, in particular after compiler transformations.