<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I'll take a look.</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> security-dev <security-dev-retn@openjdk.org> on behalf of Jiangli Zhou <jiangli@openjdk.org><br>
<b>Sent:</b> Monday, April 24, 2023 10:27 AM<br>
<b>To:</b> jmx-dev@openjdk.org <jmx-dev@openjdk.org>; security-dev@openjdk.org <security-dev@openjdk.org>; serviceability-dev@openjdk.org <serviceability-dev@openjdk.org><br>
<b>Subject:</b> Re: RFR: 8306033: Resolve multiple definition of 'throwIOException' and friends when statically linking with JDK native libraries</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Mon, 17 Apr 2023 16:56:31 GMT, Jiangli Zhou <jiangli@openjdk.org> wrote:<br>
<br>
> - Make functions 'static' when feasible:<br>
> - throwByName() in src/java.security.jgss/share/native/libj2gss/NativeUtil.c.<br>
> - throwByName(), throwIOException() and throwNullPointerException() in src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.c.<br>
> - throwByName() in src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_util.c.<br>
> - throwOutOfMemoryError() in src/java.smartcardio/share/native/libj2pcsc/pcsc.c.<br>
> - Move throwDisconnectedRuntimeException() to src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_util.c since it's only used in the file. Make it static.<br>
> - Move throw_internal_error() to src/jdk.management/unix/native/libmanagement_ext/OperatingSystemImpl.c as it's only used in the file. Make it static.<br>
> <br>
> - Rename functions by following the existing naming usages in different libraries code:<br>
> - Rename throwOutOfMemoryError() to gssThrowOutOfMemoryError() in libj2gss.<br>
> - Rename throwOutOfMemoryError() to p11ThrowOutOfMemoryError() in libj2pks11.<br>
> - Rename throwNullPointerException() to p11ThrowNullPointerException() in libj2pks11.<br>
> - Rename throwIOException() to p11ThrowIOException() in libj2pks11.<br>
> - Rename throwPKCS11RuntimeException() to p11ThrowPKCS11RuntimeException() in libj2pks11. This function only exists in libj2pks11. The rename is done so the function naming is consistent with the other throw<exception> functions.<br>
> <br>
> - Remove throw_internal_error() from src/java.management/share/native/libmanagement/management.h and src/java.management/share/native/libmanagement/management.c. It's not used.<br>
> - Remove throw_internal_error() from src/jdk.management/share/native/libmanagement_ext/management_ext.h and src/jdk.management/share/native/libmanagement_ext/management_ext.c.<br>
<br>
Gentle ping, please help review this PR. Thanks.<br>
<br>
-------------<br>
<br>
PR Comment: <a href="https://git.openjdk.org/jdk/pull/13497#issuecomment-1520559203">
https://git.openjdk.org/jdk/pull/13497#issuecomment-1520559203</a><br>
</div>
</span></font></div>
</body>
</html>