File.readlink blows up JRuby on Windows (Vista)
-----------------------------------------------
Key: JRUBY-2351
URL: http://jira.codehaus.org/browse/JRUBY-2351
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.1
Environment: Latest JRuby 1.1 from trunk.
Reporter: Vladimir Sizikov
Priority: Critical
On Windows (at least, Vista x64):
File.readlink('existing-file') leads to JRuby crash:
{noformat}
irb(main):002:0> File.readlink('unitFailuresOnWindows.diff')
Exception in thread "main" java.lang.UnsatisfiedLinkError: Error looking up
function 'readlink': The specified
procedure could not be found.
at com.sun.jna.Function.<init>(Function.java:126)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:219)
at com.sun.jna.Library$Handler.invoke(Library.java:191)
at $Proxy0.readlink(Unknown Source)
at
org.jruby.ext.posix.BaseNativePOSIX.readlink(BaseNativePOSIX.java:192)
at org.jruby.RubyFile.readlink(RubyFile.java:1467)
at org.jruby.RubyFileInvoker$readlink_s_method_1_0.call(Unknown Source)
at
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOne.call(JavaMethod.java:120)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:66)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:101)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:238)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:657)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:308)
at org.jruby.evaluator.ASTInterpreter.rootNode(ASTInterpreter.java:1615)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:458)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168)
at
org.jruby.evaluator.ASTInterpreter.evalWithBinding(ASTInterpreter.java:222)
at org.jruby.RubyKernel.eval(RubyKernel.java:714)
at org.jruby.RubyKernelInvoker$eval_s_method_1_3.call(Unknown Source)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:66)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:235)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1100)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:354)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:176)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:66)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:235)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:657)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:308)
at
org.jruby.evaluator.ASTInterpreter.setupArgs(ASTInterpreter.java:2149)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1095)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:354)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:631)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:302)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:176)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:66)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:235)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:657)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:308)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:631)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:302)
at
org.jruby.evaluator.ASTInterpreter.rescueNode(ASTInterpreter.java:1517)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:452)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:631)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:302)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:150)
at org.jruby.runtime.Block.yield(Block.java:114)
at
org.jruby.evaluator.ASTInterpreter.yieldNode(ASTInterpreter.java:1811)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:493)
at
org.jruby.evaluator.ASTInterpreter.ensureNode(ASTInterpreter.java:1072)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:348)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:631)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:302)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:176)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:248)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1105)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:354)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:150)
at org.jruby.runtime.Block.yield(Block.java:114)
at
org.jruby.evaluator.ASTInterpreter.yieldNode(ASTInterpreter.java:1811)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:493)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:631)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:302)
at
org.jruby.evaluator.ASTInterpreter.rescueNode(ASTInterpreter.java:1517)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:452)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:150)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:115)
at org.jruby.runtime.Block.yield(Block.java:109)
at org.jruby.RubyKernel.loop(RubyKernel.java:902)
at org.jruby.RubyKernelInvoker$loop_s_method_0_0.call(Unknown Source)
at
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:101)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:86)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:251)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1105)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:354)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:150)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:115)
at org.jruby.runtime.Block.yield(Block.java:109)
at org.jruby.RubyKernel.rbCatch(RubyKernel.java:742)
at org.jruby.RubyKernelInvoker$rbCatch_s_method_1_0.call(Unknown Source)
at
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneBlock.call(JavaMethod.java:139)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:86)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:251)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1105)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:354)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:631)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:302)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:176)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:86)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:251)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:662)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:308)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:631)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:302)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:176)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:66)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:101)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:238)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:657)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:308)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:150)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:115)
at org.jruby.runtime.Block.yield(Block.java:109)
at org.jruby.RubyKernel.rbCatch(RubyKernel.java:742)
at org.jruby.RubyKernelInvoker$rbCatch_s_method_1_0.call(Unknown Source)
at
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneBlock.call(JavaMethod.java:139)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:86)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:251)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1105)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:354)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:631)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:302)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:176)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:78)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:146)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:302)
at
ruby.D_3a_.work.jruby_minus_dev.jruby.bin.jirb.__file__(D:\work\jruby-dev\jruby\bin\..\bin\jirb:19)
at
ruby.D_3a_.work.jruby_minus_dev.jruby.bin.jirb.load(D:\work\jruby-dev\jruby\bin\..\bin\jirb)
at org.jruby.Ruby.runScript(Ruby.java:511)
at org.jruby.Ruby.runNormally(Ruby.java:431)
at org.jruby.Ruby.runFromMain(Ruby.java:311)
at org.jruby.Main.run(Main.java:141)
at org.jruby.Main.run(Main.java:88)
at org.jruby.Main.main(Main.java:79)
{noformat}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email