Does anyone knows what happens to the stack and memory of the EVM when an external contract is invoked?
Do the stack and memory get "cleaned" in order for the external contract to execute its code or are the new variables added on top of the previous ones (which in my opinion could be potentially dangerous since the external contract could manipulate the original contract variable values...)?
I know that the context changes when an external contract gets invoked, I would only assume that the same happens to the stack and memory (basically, I thought that the stack and memory were part of the context that gets swapped between calls) but I could not find a confirmation anywhere...