This nearly happened to me while training in Sandhurst. It doesn't need to be hot for it to happen, my incident happened on a day where is was only 17 Celsius.
It was a log race competition and basically I ran out of H2O. I had drunk all that I was carrying and I didn't have time to drink any more in any case. With just a mile to go I went from feeling absolutely fine to beginning to struggle. I pushed on because I didn't want to let my mates down. The last memory I have is of running down the road back to the back gate off Barossa. Apparently I continued another 500m but I don't remember that, I collapsed and started to vomit....bile. I was evacuated to the medical centre where they fought with me to cannulate me so they could get some fluids in, but I was in a panic and fighting them off. They were considering sedating me but for some reason I relented. I later found out that the doc was prepared for the log run and the possibility of heat injuries and had cool fluids ready.
I was evacuated to the local hospital where I went in to total body cramp, one of the most painful things I have experienced. In A&E I was treated by doctors who would later on become friends and colleagues as I commissioned in to the medics. I was given diazepam to combat the cramp but I fond myself unable to make coherent words, so when they asked me for my parent's details so they could inform them all I could do is dribble. About an hour had passed but I only had snippets of memory totalling about 5 minutes.
Overt he next 24 hours they pumped 22L of saline through me as apparently heat injuries cause proteins to break off in to the blood which clog the kidneys eventually causing kidney and multiple organ failure. I didn't sleep becaue they kept taking observations every 30 minutes. I needed regular blood tests and check-ups for several weeks afterwards and here is became apparent how lucky I was. I had reached an internal body temp of 41.9C. Many die when they reach 41C. I am sure it is the initial intervention from the doctor at Sandhurst that saved me.