Apply and test Sergey's patch for SIGSEGV.