In JDK-8343789, the 32-bit int value returned by JVMCINMethodData::size was cast to a uint_16. This value is used to compute the offset of the JVMCINMethodData chunk in CodeBlob::_mutable_data. The allocation of memory for CodeBlob::_mutable_data on the other hand, uses JVMCINMethodData::size without any casting. This inconsistency results in memory being written out of bounds in the case where a very long name is attached to JVMCI installed code (see JDK-8355034).
I think the right fix is to revert nmethod::_jvmci_data_size back to an int.