[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8306033: Resolve multiple definition of 'throwIOException' and friends when statically link
From:       Jiangli Zhou <jiangli () openjdk ! org>
Date:       2023-04-26 15:02:23
Message-ID: mF1MpDqHZA3_tc1y7_x5va4bY8d8ltRTCCwGA6qG7eU=.2cf00a75-d9f6-4066-a49f-7fdaffcc3c7f () github ! com
[Download RAW message or body]

On Tue, 25 Apr 2023 00:47:17 GMT, Jiangli Zhou <jiangli@openjdk.org> wrote:

> > - Make functions 'static' when feasible:
> > - throwByName() in src/java.security.jgss/share/native/libj2gss/NativeUtil.c.
> > - throwByName(), throwIOException() and throwNullPointerException() in \
> >                 src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.c.
> > - throwByName() in src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_util.c.
> > - throwOutOfMemoryError() in src/java.smartcardio/share/native/libj2pcsc/pcsc.c.
> > - Move throwDisconnectedRuntimeException() to \
> > src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_util.c since it's only used \
> >                 in the file. Make it static.
> > - 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. 
> > - Rename functions by following the existing naming usages in different libraries \
> >                 code:
> > - Rename throwOutOfMemoryError() to gssThrowOutOfMemoryError() in libj2gss.
> > - Rename throwOutOfMemoryError() to p11ThrowOutOfMemoryError() in libj2pks11.
> > - Rename throwNullPointerException() to p11ThrowNullPointerException() in \
> >                 libj2pks11.
> > - Rename throwIOException() to p11ThrowIOException() in libj2pks11.
> > - 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. 
> > - 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.
> > - 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.
> 
> Jiangli Zhou has updated the pull request incrementally with one additional commit \
> since the last revision: 
> Minor updates, as suggested by mcpowers:
> - Update copyright headers in affected files.
> - Formatting update in src/java.security.jgss/share/native/libj2gss/GSSLibStub.c.
> - Remove throwByName() and move the logic into gssThrowOutOfMemoryError() (the only \
> caller) in src/java.security.jgss/share/native/libj2gss/NativeUtil.c.

Thanks for the reviews.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13497#issuecomment-1523566931


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic