Deoptimization is susceptible to failure because it uses cross code patching. At the moment we know of no cpu's where this fails but we may well be running out of time. Newer Intel processors have an errata which isn't planned to be fixed that hints that we could fail.
We should use a deopt scheme that uses return address patching instead. This also allows us to go to single frame deopt. a capability we lost when lazy deopt was implemented.
From the putback comment:
This converts deoptimization to no longer do patching of code
and now only patches return address. This made a rather large
change to the frame object so that now a frame always carries
along the codeBlob it refers to if it in fact does refer to
a codeBlob. This removes lots of redundant CodeCache::find_blob
calls. The testing of this fix which obviously changes the way
frames look on the stack discovered that both SA and pstack support
have been broken. pstack support has been been broken for years.