JetBrains / lincheck

Framework for testing concurrent data structures
Mozilla Public License 2.0
589 stars 34 forks source link

Bytecode verification error after instrumentation of constructors (`<init>` methods) because of `leaking this` #424

Open dmitrii-artuhov opened 1 week ago

dmitrii-artuhov commented 1 week ago

Currently lincheck omits transformation of <init> methods in the transformers chain (see LincheckClassVisitor::visitMethod). There is a problem with passing object references to injection methods. This may be observed for instrumentation of GETFIELD/PUTFIELD instructions in constructors: