Affects Version/s: b28, b29, b30
Fix Version/s: b31
Function JDK_GetVersionInfo0 is suppose to memset the incoming jdk_version_info struct, info, using the supplied size_t value, info_size, as the byte count. The current code calls
memset(info, 0, sizeof(info_size));
i.e. it only zeroes 8 bytes. It should be
memset(info, 0, info_size);
This can cause mayhem in the JVM because the flag fields at the end of the struct end up taking values determined by the contents of the stack frame where info is allocated. In particular, it can cause the post-jdk6-b28 GC to enqueue discovered References using the wrong link field which means that no reference processing (including finalization) occurs.