I want to determine what’s causing a segfault, and I’m trying to use valgrind to do this.
https://gist.github.com/4349869 is a gist where I’m getting a segfault when I run something without valgrind, but I don’t get a segfault when I use valgrind. (I’ve repeated this several times, with the same result)
Does this mean that the bug is a heisenbug that won’t occur when I use valgrind, and therefore valgrind isn’t any use here?
No, you should still use Valgrind and fix all reported errors. The behavior you described is rather common and it is documented in Valgrind FAQ: