ManyThreads / mythos

Many Threads Operating System
https://manythreads.github.io/mythos/
MIT License
17 stars 4 forks source link

writeThreadRegisters in ExecutionContext has no atomic behaviour #208

Open rottaran opened 3 years ago

rottaran commented 3 years ago

All action should check for correctness and, then, either fail or finish completely. writeThreadRegisters fails to set the FS and GS base addresses if they are non-canonical. However, at the point where this check is done, all other registers are already touched. And then the EC gets into trapped state whereas the invocation returns failure to the user. No failure to carry out an action should ever cause side effects.