It turns out that SourceManager::isInSystemHeader() crashes when an invalid source location is passed into it. Invalid source locations are relatively common: not only they come from body farms, but also, say, any function in C that didn't come with a forward declaration would have an implicit forward declaration with invalid source locations.
Not sure if this deserves to be fixed in SourceManager, but there's anyway a more comfy API for us to use in the Static Analyzer: CallEvent::isInSystemHeader(), so i just used that.