Comments (10)
Are you using a nonstandard JVM? It appears that your JVM is handling invalid innerclass attribute lengths differently than Hotspot does. At any rate, you can ignore the test if you want.
For what it's worth, here's mine.
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
from krakatau.
The relevant code is in http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/file/5dce25362b8a/src/share/vm/classfile/classFileParser.cpp. Does your build include this?
from krakatau.
I'm using the standard JVM. Well, the standard JVM for my family of operating systems. http://openjdk.java.net/projects/icedtea/
I used to install Sun Java on my GNU/Linux systems, but starting with openjdk-7, I was promised that openjdk-7 would BE the standard.
...Hm, yes, that still seems to be the case. According to http://openjdk.java.net/faq/, Oracle Java is based on OpenJDK, not the other way around. :)
That being said, I'll certainly see what JVMs are available for my Debian machine and see which ones pass or fail this test.
Hm, java.lang.ClassFormatError: Truncated class file
seems like a reasonable response to the .innerlength 0xFFFFFFFF
thing, right?
Cheers,
from krakatau.
BadInnerTest and OldVersionTest are effectively testing undocumented corner cases in Hotspot. You can ignore them if you wish.
I'm surprised yours is behaving differently though since the code is part of the OpenJDK code base.
from krakatau.
I have learned that I can use different VMs by employing command line arguments when invoking java
.
Abbreviated java -help
output:
-server to select the "server" VM
-zero to select the "zero" VM
-jamvm to select the "jamvm" VM
-avian to select the "avian" VM
The default VM is server,
because you are running on a server-class machine.
(server
is apparently IcedTea
, though I have also read that my default VM is Hotspot
and I'm not sure about the relationship between them in OpenJDK. It's not even clear to me that IcedTea
is a VM and not merely a build environment for OpenJDK.)
However, it's not immediately apparent to me whether I need to modify runtests.py
or tests/__init__.py
in order to add a command line argument to the java
invocation.
from krakatau.
You need to modify runtests.py line 27. For consistency, you'd probably want to change line 74 too.
init.py only has the name and inputs for each test.
from krakatau.
So, I modified runtests.py
to take a command line argument --vm=
and here are my results, just FYI. The results for avian
are apparently a local problem.
$ ./runtests.py --vm=server |tail -22:
VM was: server. Test results:
ArgumentTypes: Pass
ArrayTest: Pass
BadInnerTest: Fail
BoolizeTest: Pass
ControlFlow: Pass
DoubleEdge: Pass
DuplicateInit: Pass
NullInference: Pass
OddsAndEnds: Pass
OldVersionTest: Pass
SkipJSR: Pass
StaticInitializer: Pass
Switch: Pass
Synchronized: Pass
TryCatchTest: Pass
UnicodeTest: Pass
WhileLoops: Pass
floattest: Pass
splitnew: Pass
18/19 tests passed
$ ./runtests.py --vm=zero |tail -22:
VM was: zero. Test results:
ArgumentTypes: Pass
ArrayTest: Fail
BadInnerTest: Fail
BoolizeTest: Pass
ControlFlow: Pass
DoubleEdge: Pass
DuplicateInit: Pass
NullInference: Pass
OddsAndEnds: Pass
OldVersionTest: Pass
SkipJSR: Pass
StaticInitializer: Pass
Switch: Fail
Synchronized: Pass
TryCatchTest: Pass
UnicodeTest: Pass
WhileLoops: Pass
floattest: Pass
splitnew: Pass
16/19 tests passed
$ ./runtests.py --vm=jamvm |tail -22:
VM was: jamvm. Test results:
ArgumentTypes: Pass
ArrayTest: Fail
BadInnerTest: Fail
BoolizeTest: Pass
ControlFlow: Fail
DoubleEdge: Pass
DuplicateInit: Pass
NullInference: Pass
OddsAndEnds: Pass
OldVersionTest: Pass
SkipJSR: Pass
StaticInitializer: Pass
Switch: Pass
Synchronized: Pass
TryCatchTest: Pass
UnicodeTest: Pass
WhileLoops: Pass
floattest: Pass
splitnew: Pass
16/19 tests passed
$ ./runtests.py --vm=avian |tail -22:
VM was: avian. Test results:
ArgumentTypes: Fail
ArrayTest: Fail
BadInnerTest: Fail
BoolizeTest: Fail
ControlFlow: Fail
DoubleEdge: Fail
DuplicateInit: Fail
NullInference: Fail
OddsAndEnds: Fail
OldVersionTest: Fail
SkipJSR: Fail
StaticInitializer: Fail
Switch: Fail
Synchronized: Fail
TryCatchTest: Fail
UnicodeTest: Fail
WhileLoops: Fail
floattest: Fail
splitnew: Fail
0/19 tests passed
from krakatau.
That's weird. The pure Java tests (ArrayTest and Switch) shouldn't fail regardless of which JVM is being used. Did you record what the error messages were? The only thing I can think of is that it might be printing out stack traces differently after recompilation despite compiling without debugging info.
P.S. Did you remember to regenerate the expected outputs (tests/*.test) in between tests? If you switch VMs without changing the expected output you'll get false failures.
from krakatau.
I went ahead and disabled the implementation specific tests (BadInnerTest and OldVersionTest).
from krakatau.
FYI, I tested this again a couple weeks ago and it no longer works even in Java 8. It seems that this undocumented feature is only present up to Java 7.
from krakatau.
Related Issues (20)
- Re-assembled class fails to load (java/lang/ClassFormatError) HOT 11
- Assemble resource files HOT 2
- Decompilation error: AttributeError: 'NoneType' object has no attribute 'type' HOT 4
- try-catch class name causing UnicodeEncodeError: 'ascii' codec can't encode character u'\u200b' in position 0: ordinal not in range(128) HOT 2
- error Traceback (most recent call last) HOT 1
- illegal class/method/package names or modifiers HOT 2
- Interest in Krakatau 2? HOT 85
- bytecode peephole optimization non-looping-loops HOT 6
- Krakatau does not generate local variables info HOT 5
- Missing undocumented opcodes. HOT 3
- Cannot reassemble HOT 4
- is there any grammar book/doc for krak2? HOT 2
- When executing the command, an error "krak2 dis --out temp" HOT 2
- Fields without access flags have an extra space in the disassembly result.
- v2 seems not to have an option to assemble multiple classes into a single .jar HOT 7
- RuntimeError: maximum recursion depth exceeded while calling a Python object HOT 1
- crash with useless trycatches HOT 3
- Assemble .j files in Directory HOT 3
- 'rU' mode generate a backtrace in python 3.11+ HOT 3
- Issue with building "cargo build --release" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from krakatau.