Commit 0b80b746 authored by Mingyao Yang's avatar Mingyao Yang
Browse files

Fix assert failure in interpreter after deoptimization.

There is code that does
  new String(chararr, 0, chararr_count);
which under debuggable turns into a call into pNewEmptyString() plus a
call into pNewStringFromChars_CII().
Even though we currently don't patch return pc in a runtime method,
calling into pNewEmptyString() is special since it's hacked such
that it's acting as if the caller calls into the java method
StringFactory.newEmptyString() directly. So deoptimization can now
happen at the NewEmptyString site and the assert is triggered since
it's a new instance instead of an invoke instruction.

The fix relaxes the assert to allow the special case.

Bug: 28555675

(cherry picked from commit 504a6908)

Change-Id: Idbb159b5aa450df2344cd93ae74fef5f55bdc534
parent 63347bbb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment