Hunting Bugs with Git Bisect | Interrupt

It’s one of those nights- your project has been moving along at breakneck pace, with all of its contributors committing refactors, improvements, and bugfixes. You’ve been using git commands so much recently that you can rely on your fingers’ muscle memory to do all of your git operations for you. All of a sudden, you get that dreaded message from a teammate:

This is a companion discussion topic for the original entry at

Hey! Great article! I use SVN at work and I do the bisection by hand. I will try svn-bisect next time. Yes: I know there will be a next time…

Side note- it’s always great to go through your own git history and see how incredibly helpful your commit messages were.

When I saw the commit messages and read “misc changes”, I told myself “what a great commit message”. before reminding that I often use “minor changes”… Don’t worry you’re not the only one.

Additional fun fact here: that was the bad commit!

It always is… I’ve done this too many times to count. The primary reason this has mostly stopped for me and others on the team is that we use Phabricator (and Github PR Templates), which force more detailed commit messages and descriptions. It’s been nice and only takes a couple of extra minutes and it pays off dividends in the future.

Can’t even count the number of times a bad commit message has led to sadness.
Also can’t count the number of times that a good commit template has saved me. The more descriptive I’m encouraged to be about the issues I’m solving, the changes I’ve made, and the testing I’ve conducted, the more I think of holes in my logic that I should check.

And of course, when commit messages are really bad, interactive rebase does wonders for me :slight_smile:

Do you know of any public facing examples that do the kind of task you were trying to achieve(ram -> flash). It looks like an interesting project. You also mention “I could not memory map it”, is it possible to elaborate on that? What kind of microcontrollers do not allow it?

In my experience this is a very standard thing to do. You’ll need to make sure your firmware is linked at the right addresses, and have your bootloader do the copying. I’ve got an example in the zero-to-main repo: zero-to-main/bootload-reloc at master · memfault/zero-to-main · GitHub.

As far as I know, no microcontroller allows dynamic memory mapping. Some allow XIP from a quad-spi peripheral, in which case there is fixed address space mapped to it in hardware.

1 Like