Commit ffaa91d3 authored by Aart Bik's avatar Aart Bik Committed by Nicolas Geoffray
Browse files

Workaround invokesuper underspecified behavior.

The verifier allows invokesuper on a class unrelated
to the referring class. However, the runtime uses the vtable of
the super class of the referring class to lookup the ArtMethod.
Since the receiver has no relation to the referring class, this lead
to either jumping to a wrong method, or "luckily" throw a
NoSuchMethodError if the vtable index is out of bounds of the super
class of the referring class.

This changes the runtime behavior to always throw NoSuchMethodError
when hitting such invokesuper.

Also, we make the verifier consistent with the runtime by treating
such calls unresolved.

bug=27627004

(cherry picked from commit f663e341)

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