<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em sex., 12 de ago. de 2022 às 12:13, Thomas Stüfe <<a href="mailto:thomas.stuefe@gmail.com">thomas.stuefe@gmail.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 12, 2022 at 5:02 PM Maurizio Cimadamore <<a href="mailto:maurizio.cimadamore@oracle.com" target="_blank">maurizio.cimadamore@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p><br>
</p>
<div>On 12/08/2022 15:55, Pedro Lamarão
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">Em sex., 12 de ago. de 2022 às 11:50, Maurizio
Cimadamore <<a href="mailto:maurizio.cimadamore@oracle.com" target="_blank">maurizio.cimadamore@oracle.com</a>>
escreveu:</div><div class="gmail_quote">
<div><br>
</div>
<div>Of course, this would disturb any interaction with
Windows API, however it was activated.</div>
<div>For some reason, such a debugger has been working with
software for some time, and I presume it works with software
that calls the system via JNI.</div>
<div>Is there perhaps some kind of special "locking" when
calling into JNI which the debugger might have learned to
respect?</div>
</div>
</div>
</blockquote>
<p>I think what we need at this point is some more testing.</p>
<p>E.g. can we reproduce the same issue with JNI? E.g. assume we
have a JNI binding for Windows API we want to call and a
_different_ JNI binding for checking LastError. Does that show the
same problem?</p></div></blockquote><div>Stupid question, since those calls are embedded into java code, can this really be prevented? E.g. thread allocates object -> causes heap to expand -> needs commit -> calls VirtualAlloc?</div><div><br></div><div>I would have thought that you need to treat GetLastError special. JNA seems to do this: <a href="https://github.com/java-native-access/jna/blob/999c60a1fa0ab1154b07edffa3748ce46d8d3b89/src/com/sun/jna/NativeLibrary.java#L130" target="_blank">https://github.com/java-native-access/jna/blob/999c60a1fa0ab1154b07edffa3748ce46d8d3b89/src/com/sun/jna/NativeLibrary.java#L130</a></div></div></div></blockquote><div><br></div><div>JNR seems to have special support here: <a href="https://github.com/jnr/jnr-ffi/blob/master/src/main/java/jnr/ffi/LastError.java">https://github.com/jnr/jnr-ffi/blob/master/src/main/java/jnr/ffi/LastError.java</a> </div></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Pedro Lamarão</div></div></div></div>