<div dir="ltr"><div dir="ltr">Em sex., 12 de ago. de 2022 às 12:05, Pedro Lamarão <<a href="mailto:pedro.lamarao@prodist.com.br">pedro.lamarao@prodist.com.br</a>> escreveu:<br></div><div class="gmail_quote"><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><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em sex., 12 de ago. de 2022 às 12:01, Maurizio Cimadamore <<a href="mailto:maurizio.cimadamore@oracle.com" target="_blank">maurizio.cimadamore@oracle.com</a>> escreveu:<br></div><div><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></p>
<p>As I said, I believe this should be visible in JNI too - but
perhaps nobody would write code like this using JNI. E.g. with
JNI, since it's painful enough to write one native method,
developers tend to "lump" multiple functionalities, e.g. error
checking, in the same native method implementation. Which,
coincidentally, bypasses some issues that might be visible when
using debuggers (so it is possible that this is a problem that
debuggers never had to worry too much about).</p></div></blockquote><div><br></div><div>Something like this would happen in JNA and JNR based code.</div><div>I am familiar with these; I'll port the original poster program and push to Github.</div></div></div></blockquote><div><br></div><div>Here: <a href="https://github.com/pedrolamarao/jvm-getlasterror">https://github.com/pedrolamarao/jvm-getlasterror</a></div><div><br></div><div>Intellij should be able to understand this with a JDK 19 EA build.</div><div><br></div><div>Simply running the program in the IDE gives the expected result for "panama" and "jna", but not "jnr", in my machine.</div><div>Very interesting.</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Pedro Lamarão</div></div></div></div>