I may have stumbled onto a solution. I tried reducing the number of rendering threads (Preferences -> Video tab) from 4 to 2 and then the render finished without incident. Hopefully this completely solves the problem, and hopefully this information will help other people.