There's a good chance that it's a failure/problem with the MAF (Mass Air Flow) meter. This is a symptom of the "limp home" mode.
Check the connectors on the MAF to make sure they are clean, tight, etc. The MAF has a heated wire in it, stretched across the air flow. The ECU determines the volume of air flow into the engine indirectly by measuring how fast the wire is cooling down.
Assuming that this is your problem - The ECU can't determine how much air is flowing into the engine, so it can't determine how much fuel to inject. The engineers designed a "limp home" mode with a fixed amount of fuel injection. It stalls because too much air/too little fuel is being injected as you try to speed up.