9 Oct
2017
9 Oct
'17
11:24 a.m.
On 06/10/2017 11:34, Kazunori Ogata wrote:
Hi all,
Please review a change for JDK-8188858.
Bug report: https://bugs.openjdk.java.net/browse/JDK-8188858 Webrev: http://cr.openjdk.java.net/~horii/8188858/webrev.00/
This change caches the result of latestUserDefinedLoader() when objects are deserialized, so the decerializer can avoid redundant stack walking to resolve classes of deserializing objects. Some of the bugs/abuses of OIS come about from calling it on different threads with different contexts. So I think this optimization can only work if to confine it to the thread calling readUnshared, meaning readResolve cannot skip latestUserDefinedLoader() when called on other threads.
-Alan