RFR(XS): 8081288: erronous free in RegClass::~RegClass()
zoltan.majo at oracle.com
Thu Oct 8 12:36:58 UTC 2015
please review the patch for JDK-8081288.
Problem: JDK-8075798 modified the destructor of RegClass to free the
_classid field of that class:
This is bad software engineering practice because the _classid field
points to a memory region *not* allocated by the class itself
(allocation happens in ADLParser::get_ident_common); freeing the memory
region in RegClass can also lead to errors if ADLParser is changed in
the future to release memory it has allocated.
The problem was spotted by Krystal Mok.
Solution: Change code to not free _classid.
Thank you and best regards,
More information about the hotspot-compiler-dev