[PATCH] 6822627: NPE at ReferenceTypeImpl.constantPool

Egor Ushakov egor.ushakov at jetbrains.com
Fri Jul 15 07:03:42 UTC 2016


Thanks for your comments!

I totally agree that the code there requires major refactoring. In the 
fix I tried not to make it worse and fix the NPE.


On 14.07.2016 20:06, Martin Buchholz wrote:
> The lack of volatile or synchronization, plus the use of multiple 
> mutable fields, suggests that a deeper fix is necessary to be truly 
> correct.  For comparison, much of the similar code implementing 
> reflection has been changed to use volatile.  But that's a big job, 
> for the serviceability team.
>
> On Thu, Jul 14, 2016 at 2:33 AM, Egor Ushakov 
> <egor.ushakov at jetbrains.com <mailto:egor.ushakov at jetbrains.com>> wrote:
>
>     Hi,
>
>     I'm a developer from IDEA debugger (we have company OCA).
>     We've increased usage of ReferenceTypeImpl.constantPool and now facing
>     JDK-6822627 more often.
>     Please review and sponsor the fix.
>
>     The problem was that constantPoolBytesRef SoftReference value coud be
>     GCed and there was no check for that.
>     I've added it to the check inside getConstantPoolInfo to request the
>     bytes again in this case.
>
>     BUGURL: https://bugs.openjdk.java.net/browse/JDK-6822627
>     WEBREV: http://cr.openjdk.java.net/~avu/JDK-6822627/webrev.00/
>     <http://cr.openjdk.java.net/%7Eavu/JDK-6822627/webrev.00/>
>
>     Thanks!
>
>     -- 
>     Egor Ushakov
>     Software Developer
>     JetBrains
>     http://www.jetbrains.com
>     The Drive to Develop
>
>

-- 
Egor Ushakov
Software Developer
JetBrains
http://www.jetbrains.com
The Drive to Develop

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20160715/6ee62b49/attachment.html>


More information about the serviceability-dev mailing list