What happens if one uses Checks-Effects-Interactions Pattern and the gas runs out before the last line of the code in the contract can be reached, i.e., the last line is to interact with another contract and/or making an external call.
The resultant state is an incorrect state as the contract execution is incomplete. Would the use of revert() work?
What if the revert line is never reached as well?