Update J7: Throw bad_alloc in alloc paths.