-fstack-protector + valgrind ==> stack array overflow debugging?

stack array overflow background

I’ve recently been playing with valgrind to help find/debug stack overflow bugs in MPICH2. That is, places where someone made a programming mistake and scribbled past the end of an array that lives on the stack, such as in this MPICH2 ticket (and associated fix). I’m not really concerned about finding malicious buffer-overflow attacks in this post, more just the general program bugs from stack array overflows.

[...]

handy "git log" options and the nowrap script

I recently settled on two sets of options to “git log” that I greatly prefer over the defaults. The first is:

--pretty=tformat:"%C(yellow)%h%Creset %Cblue%aN%Creset %Cred%d%Creset %s"

This is basically an improved version of --pretty=oneline that gives output that looks like the following:

[...]

otx: Objective-C disassembly

Let’s say that you have a closed-source Objective-C program on your Mac that needs a minor modification. Maybe the company is delayed in sending you the license file that you purchased, or the company went out of business and there’s no way that the code will ever get fixed.

I’m not very sophisticated at this sort of thing, but I’ve twiddled a few bits here and there in the past. Usually simple stuff like replacing a set of instructions with no-ops or altering a constant in a move or arithmetic instruction. However, it was always in regular C programs, so the standard GNU binutils like nm and objdump, together with xxd, have been sufficient to get an idea of what was going on in the program. Unfortunately, these tools aren’t sufficient by themselves for an Objective-C program.

[...]

minor tab sweep

A little while back I posted about some SVN permissions problems that we had at work. While cleaning up my many open tabs today I came across this page that I read when trying to figure out what was going on. It pretty well describes what we ran in to, which is yet another one of the many lousy SVN shortcomings. We basically went with the fourth solution as our fix.