GetLastError() (with and without debugger)
Pedro Lamarão
pedro.lamarao at prodist.com.br
Fri Aug 12 16:22:07 UTC 2022
Em sex., 12 de ago. de 2022 às 13:05, Maurizio Cimadamore <
maurizio.cimadamore at oracle.com> escreveu:
> If this is a problem with the debugger accidentally overwriting LastError
> on some platforms, I think it would be perhaps better to fix it at that
> level (given that our JVM has some code to defend against similar
> accidental overwrites, I'm assuming that it is possible for the JVM
> code/debugger code to act in a "transparent" fashion).
>
There is the option of restoring this value by writing the saved copy back
into errno or pushing it with SetLastError.
Even a native framework which might be called from some kind of user
callback, and then call into the system "during" user code, must take care
to do this.
This way, user code would not need special support from anyone; it would
check the standard mechanism and get the correct value.
--
Pedro Lamarão
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20220812/f543f411/attachment.htm>
More information about the panama-dev
mailing list