[nb: cross posted]
You and Marv are quite right, and I quote from the Intel manual:
If the STI instruction is followed by a CLI instruction
(which clears the IF flag), the effect of the STI
instruction is negated.
That's typical Intel, that is. Corporate motto: We Will Find New and
Inventive Ways to Break Your Software[TM]. Presumably if we all code:
next year Intel will bring out a processor on which it doesn't work!