Message5999

Author irogers
Recipients alexey, draghuram, irogers, zyasoft
Date 2010-08-22.05:32:39
SpamBayes Score 2.7755576e-16
Marked as misclassified No
Message-id <1282455162.19.0.0306541636638.issue1611@psf.upfronthosting.co.za>
In-reply-to
Content
Not all VMs perform interpretation, for example, Jikes RVM is a compilation only VM. It doesn't trip this bug as constant propagation isn't performed in the initial compiler, but it is easy to experiment with constant propagating in this case (it may even be a moderate win) and Jython would fail 100% of the time.

Claiming the bug is in ASM is lame. ASM is a *lightweight* way of creating bytecode and particularly injecting bytecode, it is not intended to be any kind of tool to imply generated bytecode that is correct to the intent of the Java language specification.

The simplest fix to this problem is that the self field shouldn't be marked as final as it is being modified outside of the class initializer breaking the frozen intent of the class initializer. A medium-level fix is to modify the field using reflection. As the class is a singleton, the best solution is to create the singleton instance in the class initializer then rather than constructing an instance the caller should just acquire the singleton instance.

As a VM engineer this bug is a PITA. We often want to make the compiler overly aggressive to expose new sets of compiler bugs to fix. Jython's behavior means it is unsuited to this kind of aggressive bug finding.
History
Date User Action Args
2010-08-22 05:32:42irogerssetmessageid: <1282455162.19.0.0306541636638.issue1611@psf.upfronthosting.co.za>
2010-08-22 05:32:42irogerssetrecipients: + irogers, draghuram, zyasoft, alexey
2010-08-22 05:32:41irogerslinkissue1611 messages
2010-08-22 05:32:39irogerscreate