If the ecu detects something really bad, it will cut the motor to save it.
Not able to rev up sounds very timing related. Either valve time or ignition timing. Crank and cam sensors intact and ok?
If you have a leak that needs to be fixed. It will be running lean as far as the MAF and O2 sensors are concerned. This could also be another cause for the cutout.
I'd guess the computer would go into limp home mode on a vacuum leak tho. Fix it first