Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-10-25 Thread David Holmes
g to clean     this up this way. From: David Holmes To: Adam Farley8 Cc: Alan Bateman , core-libs-dev@openjdk.java.net, hotspot-runtime-...@openjdk.java.net, thomas.stu...@gmail.com Date: 25/10/2017 13:53 Subject: Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java ---

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-10-25 Thread Adam Farley8
p has sailed and we're unlikely to want to invest the time and effort in trying to clean this up this way. From: David Holmes To: Adam Farley8 Cc: Alan Bateman , core-libs-dev@openjdk.java.net, hotspot-runtime-...@openjdk.java.net, thomas.stu...@gmail.com Date: 25/

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-10-25 Thread David Holmes
m: David Holmes To: Adam Farley8 , Alan Bateman , core-libs-dev@openjdk.java.net, hotspot-runtime-...@openjdk.java.net, thomas.stu...@gmail.com Date: 13/10/2017 14:31 Subject: Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java -

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-10-18 Thread Adam Farley8
full code here in case people are concerned > about contamination, but I would assert that this code (and the > associated vm files) prove that the concept is possible. > > Note that that code should not be enabled until after we've > integrated the code that can handle a sile

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-10-13 Thread David Holmes
teman , Adam Farley8 , core-libs-dev@openjdk.java.net, hotspot-runtime-...@openjdk.java.net, thomas.stu...@gmail.com Date: 15/09/2017 12:03 Subject: Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java --

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-10-13 Thread Alan Bateman
On 13/10/2017 13:16, Adam Farley8 wrote: Hi All, Here's a summary of the email below (which is intended, partly, as a summary of the emails before it). Let me know if you agree/disagree with any of these points. : 3) One solution is to specify a new return code for JNI. Yes, hence the need t

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-10-13 Thread Adam Farley8
...@openjdk.java.net, thomas.stu...@gmail.com Date: 15/09/2017 12:03 Subject:Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java On 15/09/2017 8:17 PM, Alan Bateman wrote: > On 15/09/2017 02:47, David Holmes wrote: >> Hi Adam, >> >> I a

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-09-21 Thread Adam Farley8
l.com Date: 15/09/2017 12:03 Subject:Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java On 15/09/2017 8:17 PM, Alan Bateman wrote: > On 15/09/2017 02:47, David Holmes wrote: >> Hi Adam, >> >> I am still very much torn over this one. I

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-09-19 Thread Adam Farley8
Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java On 15/09/2017 8:17 PM, Alan Bateman wrote: > On 15/09/2017 02:47, David Holmes wrote: >> Hi Adam, >> >> I am still very much torn over this one. I think the idea of >> print-a

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-09-15 Thread David Holmes
On 15/09/2017 8:17 PM, Alan Bateman wrote: On 15/09/2017 02:47, David Holmes wrote: Hi Adam, I am still very much torn over this one. I think the idea of print-and-exit flags for a potentially hosted library like the JVM is just wrong - we should never have done that, but we did. Fixing tha

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-09-15 Thread Alan Bateman
On 15/09/2017 02:47, David Holmes wrote: Hi Adam, I am still very much torn over this one. I think the idea of print-and-exit flags for a potentially hosted library like the JVM is just wrong - we should never have done that, but we did. Fixing that by moving the flags to the launcher is far

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-09-14 Thread David Holmes
Hi Adam, I am still very much torn over this one. I think the idea of print-and-exit flags for a potentially hosted library like the JVM is just wrong - we should never have done that, but we did. Fixing that by moving the flags to the launcher is far from trivial**. Endorsing and encouraging

[BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-09-14 Thread Adam Farley8
Hi All, I was advised (on the OpenJDK IRC channel) that supplying a fix is better than proposing the idea of one, so I've gone ahead and written a "silent exit" fix for the example case: java -agentlib:jdwp=help This fix solves that bug, and also creates the tools for other code, VM and othe

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-08-30 Thread Adam Farley8
Hi All, I've included the full text of my reply in-line below. A summary is: I continue to support the idea of a new return code on the basis that, when the VM is nonusable but no error has occurred, we have no suitable option. Right now we can: - Report an error that has not occurred. - Die a

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-08-24 Thread David Holmes
On 24/08/2017 11:30 PM, Adam Farley8 wrote: Hi Alan, David, and Tom, First, thanks again for your efforts on this. As a new guy to OpenJDK contributions, it means a lot to see so much progress on this so quickly. :) All I see is discussion :) Progress would be something else entirely. >On

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-08-24 Thread Adam Farley8
Hi Alan, David, and Tom, First, thanks again for your efforts on this. As a new guy to OpenJDK contributions, it means a lot to see so much progress on this so quickly. :) >On 24/08/2017 07:33, David Holmes wrote: >> Hi Adam, >> >> cc'ing hotspot runtime dev as runtime own JNI and the invocatio

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-08-24 Thread Alan Bateman
On 24/08/2017 07:33, David Holmes wrote: Hi Adam, cc'ing hotspot runtime dev as runtime own JNI and the invocation API - and some of the problematic code resides in the VM. Yeah, the hotspot mailing list would be a better place to discuss this as there are several issues here and several place

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-08-24 Thread David Holmes
On 24/08/2017 4:59 PM, Thomas Stüfe wrote: Hi David, our mails crossed :) And unfortunately we each added in a different hotspot mailing list. :) PS3: We should replace these annoying exit(0) calls with code that returns "JNI_SILENT_EXIT", so the C++ code has a cha

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-08-24 Thread Thomas Stüfe
Hi David, our mails crossed :) > PS3: We should replace these annoying exit(0) calls with code that returns >> "JNI_SILENT_EXIT", so the C++ code has a chance to finish. >> > > We should certainly look at getting rid of the exit() calls. Or at least consistently route them through the exit h

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-08-23 Thread Thomas Stüfe
Thomas Stüfe > To:Adam Farley8 > Cc: Java Core Libs > Date:23/08/2017 18:45 > Subject:Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM > can be exited by java > -- > > > > Hi Adam, > > woul

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-08-23 Thread David Holmes
Hi Adam, cc'ing hotspot runtime dev as runtime own JNI and the invocation API - and some of the problematic code resides in the VM. On 24/08/2017 1:54 AM, Adam Farley8 wrote: Hi All, Problem: Several of Java's "c" files call exit(0) if you pass certain command-line options to JNI_CreateJavaV

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-08-23 Thread Adam Farley8
uld only return negative return codes to JNI callers, not java executable users. From: Thomas Stüfe To: Adam Farley8 Cc: Java Core Libs Date: 23/08/2017 18:45 Subject: Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java Hi Adam, would th

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-08-23 Thread Thomas Stüfe
Hi Adam, would the JNI exit hook not solve your problem (JavaVMOption "exit")? One could use it to intercept any exit(2) calls. However, I am not sure it always fires, and if it does not, whether this should be considered a bug. The official JNI documentation is pretty sparse ( http://docs.oracle

[BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-08-23 Thread Adam Farley8
Hi All, Problem: Several of Java's "c" files call exit(0) if you pass certain command-line options to JNI_CreateJavaVM, which can terminate the C++ code JNI users use to initialise the JVM. Example: If you write some C++ code that calls JNI_CreateJavaVM, and uses the option "-agentlib:jdwp=hel