Java bytecode variable index 0's className is something strange
问题 I use ASM library to generate bytecodes and load them using Unsafe.defineAnonymous as a Class. Both work in most of cases, but after for a short time, it fails. Then I add some debug instructions in the emitted bytecodes to print something, and the output confused me for two weeks. (GWT is short for GuardWithTestHandle). 1, Two classes are generated: DYNGWT70 and DYNGWT73, and both are loaded using Unsafe . For each class, there is only one instance is created. 2, The layout of DYNGWT70 is