jatovm / jato

Jato, an open source implementation of the JVM
http://www.jatovm.org/
Other
153 stars 30 forks source link

StackOverflowError when running JRuby tests #12

Closed penberg closed 13 years ago

penberg commented 13 years ago
penberg@jaguar:~/src/jruby$ JAVACMD=jato ./bin/jruby -w test/externals/ruby1.8/runner.rb
vm/class.c:900: warning: vm_class_resolve_name_and_type not implemented
Error: Your application used more stack memory than the safety cap of 2048k.
Specify -J-Xss####k to increase it (#### = cap size in KB).
Exception trace follows:
java.lang.StackOverflowError
   at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:581)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:320)
   at java.lang.ClassLoader$1.loadClass(ClassLoader.java:1112)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:293)
   at java.lang.VMClassLoader.loadClass(Native Method)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:328)
   at java.lang.ClassLoader$1.loadClass(ClassLoader.java:1112)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:293)
   at java.lang.VMClassLoader.loadClass(Native Method)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:328)
   at java.lang.ClassLoader$1.loadClass(ClassLoader.java:1112)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:293)

   [ snip recursion ]

   at java.lang.VMClassLoader.loadClass(Native Method)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:328)
   at java.lang.ClassLoader$1.loadClass(ClassLoader.java:1112)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:293)
   at org.jruby.RubyModule.defineAnnotatedMethodsIndividually(RubyModule.java:653)
   at org.jruby.RubyModule.defineAnnotatedMethods(RubyModule.java:541)
   at org.jruby.RubyNil.createNilClass(RubyNil.java:65)
   at org.jruby.Ruby.initRoot(Ruby.java:1134)
   at org.jruby.Ruby.init(Ruby.java:1050)
   at org.jruby.Ruby.newInstance(Ruby.java:182)
   at org.jruby.Main.internalRun(Main.java:182)
   at org.jruby.Main.run(Main.java:164)
   at org.jruby.Main.run(Main.java:148)
   at org.jruby.Main.main(Main.java:128)
penberg commented 13 years ago

Nikhil fixed this by initializing annotations lazily.