Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8313396: Portable implementation of FORBID_C_FUNCTION and ALLOW_C_FUNCTION #17387

Draft
wants to merge 43 commits into
base: master
Choose a base branch
from

Conversation

TheShermanTanker
Copy link
Contributor

@TheShermanTanker TheShermanTanker commented Jan 12, 2024

Please review a portable implementation of FORBID_C_FUNCTION and ALLOW_C_FUNCTION:

Currently, FORBID_C_FUNCTION only works for gcc like compilers, and ALLOW_C_FUNCTION acts to disable CRT warnings on Windows, where FORBID_C_FUNCTION does not work. It would be beneficial to provide a universal portable definition for both, to allow the macros to work on all platforms HotSpot can be compiled for.

The implementation is portable and should work on all HotSpot supported platforms (I don't have an AIX device!).

Regrettably, I did end up having to change the signature of ALLOW_C_FUNCTION to work with this new implementation, as well as the way it is used. On one hand, it is more compact than before, but on the other the established syntax is likely more familiar by this point. I do hope this is not a showstopper, but understand if it is


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Error

 ⚠️ Found copyright format issue for oracle in [test/jdk/javax/swing/JFileChooser/6738668/bug6738668.java]

Warnings

 ⚠️ Patch contains a binary file (src/java.base/share/classes/jdk/internal/icu/impl/data/icudt74b/nfc.nrm)
 ⚠️ Patch contains a binary file (src/java.base/share/classes/jdk/internal/icu/impl/data/icudt74b/nfkc.nrm)
 ⚠️ Patch contains a binary file (src/java.base/share/classes/jdk/internal/icu/impl/data/icudt74b/ubidi.icu)
 ⚠️ Patch contains a binary file (src/java.base/share/classes/jdk/internal/icu/impl/data/icudt74b/uprops.icu)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/javax/swing/text/doc-files/Document-insert.gif)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/sun/awt/resources/security-icon-bw16.png)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/sun/awt/resources/security-icon-bw24.png)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/sun/awt/resources/security-icon-bw32.png)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/sun/awt/resources/security-icon-bw48.png)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/sun/awt/resources/security-icon-interim16.png)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/sun/awt/resources/security-icon-interim24.png)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/sun/awt/resources/security-icon-interim32.png)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/sun/awt/resources/security-icon-interim48.png)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/sun/awt/resources/security-icon-yellow16.png)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/sun/awt/resources/security-icon-yellow24.png)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/sun/awt/resources/security-icon-yellow32.png)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/sun/awt/resources/security-icon-yellow48.png)
 ⚠️ Patch contains a binary file (src/java.desktop/windows/native/libawt/windows/security_warning.ico)
 ⚠️ Patch contains a binary file (src/utils/IdealGraphVisualizer/View/src/main/resources/com/sun/hotspot/igv/view/images/hideDuplicates.png)
 ⚠️ Patch contains a binary file (test/jdk/java/security/ProtectionDomain/AllPerm.jar)
 ⚠️ Patch contains a binary file (test/jdk/java/util/zip/test.zip)
 ⚠️ Patch contains a binary file (test/jdk/sun/security/provider/PolicyFile/TokenStore.keystore)
 ⚠️ Patch contains a binary file (test/jdk/sun/security/provider/PolicyFile/TrustedCert.keystore)
 ⚠️ Patch contains a binary file (test/jdk/sun/security/provider/PolicyFile/TrustedCert.keystore1)
 ⚠️ Patch contains a binary file (test/jdk/sun/security/provider/PolicyParser/ExtDirsA/a.jar)
 ⚠️ Patch contains a binary file (test/jdk/sun/security/provider/PolicyParser/ExtDirsB/b.jar)

Issue

  • JDK-8313396: Portable implementation of FORBID_C_FUNCTION and ALLOW_C_FUNCTION (Enhancement - P4) ⚠️ Issue is already resolved. Consider making this a "backport pull request" by setting the PR title to Backport <hash> with the hash of the original commit. See Backports.

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/17387/head:pull/17387
$ git checkout pull/17387

Update a local copy of the PR:
$ git checkout pull/17387
$ git pull https://git.openjdk.org/jdk.git pull/17387/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17387

View PR using the GUI difftool:
$ git pr show -t 17387

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/17387.diff

Using Webrev

Link to Webrev Comment

@TheShermanTanker TheShermanTanker marked this pull request as draft January 12, 2024 06:16
@bridgekeeper
Copy link

bridgekeeper bot commented Jan 12, 2024

👋 Welcome back jwaters! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot changed the title 8313396 8313396: Portable implementation of FORBID_C_FUNCTION and ALLOW_C_FUNCTION Jan 12, 2024
@openjdk
Copy link

openjdk bot commented Jan 12, 2024

@TheShermanTanker The following label will be automatically applied to this pull request:

  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot hotspot-dev@openjdk.org label Jan 12, 2024
@TheShermanTanker
Copy link
Contributor Author

@kimbarrett This isn't ready for review yet, but I think I might need your help, how was your original approach able to avoid firing warnings and errors when use of forbidden methods was encountered in third party code, such as GTest? Looking at the logs mine is failing because the forbidden methods are being detected in GTest code as invalid

@TheShermanTanker
Copy link
Contributor Author

Opening to review, because I really need help with this

@TheShermanTanker TheShermanTanker marked this pull request as ready for review January 24, 2024 07:59
@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 24, 2024
@mlbridge
Copy link

mlbridge bot commented Jan 24, 2024

Webrevs

@TheShermanTanker TheShermanTanker marked this pull request as draft January 24, 2024 08:06
@openjdk openjdk bot removed the rfr Pull request is ready for review label Jan 24, 2024
@openjdk
Copy link

openjdk bot commented Mar 13, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@bridgekeeper
Copy link

bridgekeeper bot commented May 8, 2024

@TheShermanTanker This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@openjdk
Copy link

openjdk bot commented Jun 6, 2024

@TheShermanTanker this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout patch-12
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot added the merge-conflict Pull request has merge conflict with target branch label Jun 6, 2024
@bridgekeeper
Copy link

bridgekeeper bot commented Aug 1, 2024

@TheShermanTanker This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 26, 2024

@TheShermanTanker This pull request has been inactive for more than 16 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

@bridgekeeper bridgekeeper bot closed this Sep 26, 2024
@TheShermanTanker
Copy link
Contributor Author

/open

@openjdk openjdk bot reopened this Nov 30, 2024
@openjdk
Copy link

openjdk bot commented Nov 30, 2024

@TheShermanTanker This pull request is now open

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 25, 2025

@TheShermanTanker This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org merge-conflict Pull request has merge conflict with target branch
Development

Successfully merging this pull request may close these issues.

1 participant