Binary-only data contained in regression test hotspot/test/runtime/7020373

Pavel Tisnovsky ptisnovs at redhat.com
Mon Jul 11 04:19:16 PDT 2011


Rémi Forax wrote:
>  On 07/11/2011 11:54 AM, Pavel Tisnovsky wrote:
>> Hi all,
>>
>> I realized, that one part of the regression test
>> hotspot/test/runtime/7020373 contains binary-only data which IMHO
>> prevent us to backport this test to OpenJDK6 (in fact, only one file of
>> this test was backported at this moment, so this test always fails due
>> to a missed file).
>>
>> The mentioned part of 7020373 test is a Java archive "testcase.jar"
>> which contains just one file "OOMCrashClass4000_1.class" without
>> corresponding source code.
>>
>> I presume that the file "OOMCrashClass4000_1.class" were not obtained by
>> compiling regular Java source file, but using BCEL or similar tool
>> instead. The problem is that the script/source code used for creating
>> .class is not included in the test.
>>
>> Is it possible to include such script/source code to the OpenJDK7
>> repository so the test could be fully backported to OpenJDK6, please?
>>
>> Thank you in advance,
>> Pavel Tisnovsky
> 
> You can re-create it :)
> ASM [1] (a BCEL like tool) has a nice tool called the ASMifier that
> allows you to create a Java code from a class file:
> |java -classpath "asm.jar;asm-util.jar"
> org.objectweb.asm.util.ASMifierClassVisitor
> org/domain/package/YourClass.class|

Hi Rémi,

yes, I know it is possible to re-create source from .class file, but
there's (AFAIK) problem with licence text because .class file
(suprisingly :-) does not contains such licence which allows us to
re-engineer it :-)

Pavel

> 
> Rémi
> [1] http://asm.ow2.org/
> 



More information about the hotspot-runtime-dev mailing list