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

8197859: VS2017 Complains about UINTPTR_MAX definition in globalDefinitions_VisCPP.hpp #77

Closed
wants to merge 5 commits into from

Conversation

apavlyutkin
Copy link
Contributor

@apavlyutkin apavlyutkin commented Jun 22, 2022

Hi! Please review another backport from MSVS2019 seria. This one fixes type declarations made by globalDefinitions_VisCPP.hpp. The patch from 11u applied with the following changes:

  • inttypes.h is included conditionally under _MSC_VER >= 1800 because the header was introduced only in MSVS 2013 but we have to keep support of the earlier MSVS versions
  • the duplicates of declarations made in inttypes.h are not just removed but quoted with _MSC_VER < 1800
  • INT64_C & UINT64_C declarations removed cuz they duplicate ones done by stdint.h

Verification: 2019 build (both 32/64) now fails with

ad_x86_64_pipeline.obj : error LNK2011: precompiled object not linked in; image may not run
jvm.dll : fatal error LNK1120: 1 unresolved externals

error (to be fixed by backport of 8043492)

Regression: 2017/2013/2012/2010 full build - ok

@kimbarrett @dholmes-ora if you took a look at that it would be very much appreciated


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

Issue

  • JDK-8197859: VS2017 Complains about UINTPTR_MAX definition in globalDefinitions_VisCPP.hpp

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev pull/77/head:pull/77
$ git checkout pull/77

Update a local copy of the PR:
$ git checkout pull/77
$ git pull https://git.openjdk.org/jdk8u-dev pull/77/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 77

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/77.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 22, 2022

👋 Welcome back apavlyutkin! 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 Backport b8ab854bdcf625772e965a5e476e0a9db1b91f3f 8197859: VS2017 Complains about UINTPTR_MAX definition in globalDefinitions_VisCPP.hpp Jun 22, 2022
@openjdk
Copy link

openjdk bot commented Jun 22, 2022

This backport pull request has now been updated with issue and summary from the original commit.

@openjdk openjdk bot added the backport label Jun 22, 2022
@openjdk
Copy link

openjdk bot commented Jun 22, 2022

@apavlyutkin 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 8197859
git fetch https://git.openjdk.org/jdk8u-dev 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 22, 2022
@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 22, 2022
@mlbridge
Copy link

mlbridge bot commented Jun 22, 2022

Webrevs

@openjdk openjdk bot removed the merge-conflict Pull request has merge conflict with target branch label Jun 22, 2022
@apavlyutkin
Copy link
Contributor Author

ping

@apavlyutkin
Copy link
Contributor Author

Guys, this one stops a seria of backports required to support VS 2019/22. Could somebody to review it? Thank you

@apavlyutkin
Copy link
Contributor Author

ping

1 similar comment
@apavlyutkin
Copy link
Contributor Author

ping

Copy link
Contributor

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is generated-configure.sh part of this change? It doesn't touch m4 scripts.

@jerboaa
Copy link
Contributor

jerboaa commented Sep 1, 2022

Why is generated-configure.sh part of this change? It doesn't touch m4 scripts.

Ah, you mentioned it in the description. Forgotten in #33. Either way, this shouldn't be part of this backport. It's unrelated and just confuses people when looking at the backport after the fact. Please open and 8u-specific bug and correct this. Also, it's not clear why generated-configure.sh would be this large. Are you generating it with the right system? If you do it on a wrong one it can get messy and mixes unrelated changes due to version skew.

@apavlyutkin
Copy link
Contributor Author

Ok, I removed generated-configure.sh from the PR, probably the best option here to commit it after the rest of VS2019 backports (there are 2-3 more) are done

@apavlyutkin
Copy link
Contributor Author

ping

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 14, 2022

@apavlyutkin This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 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!

Copy link
Contributor

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good if some Windows build person could review this patch as well.

// Some MS Visual Studio versions do not seem to have INT64_C and UINT64_C
// even with __STDC_CONSTANT_MACROS defined.
#ifndef INT64_C
#define INT64_C(c) (c ## i64)
#endif
#ifndef UINT64_C
#define UINT64_C(c) (c ## ui64)
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These removals aren't in the original changeset. See JDK-8272714 and JDK-8272214. I guess we should conditionalize on the VS version in use if that's a problem?

@apavlyutkin
Copy link
Contributor Author

The definitions now are done by including of stdint.h that is surely available even in msvs 2010 (as I remember a far earlier). I have no idea why they were declared localy. Looks like I forgot to mention this deviation from the original changeset.

@openjdk
Copy link

openjdk bot commented Oct 22, 2022

@apavlyutkin
The label build is not a valid label.
These labels are valid:

@apavlyutkin
Copy link
Contributor Author

/cc build-dev@openjdk.org

@openjdk
Copy link

openjdk bot commented Oct 23, 2022

@apavlyutkin
The label build is not a valid label.
These labels are valid:

@jerboaa
Copy link
Contributor

jerboaa commented Oct 25, 2022

The definitions now are done by including of stdint.h that is surely available even in msvs 2010 (as I remember a far earlier). I have no idea why they were declared localy. Looks like I forgot to mention this deviation from the original changeset.

OK, thanks.

@apavlyutkin
Copy link
Contributor Author

The definitions now are done by including of stdint.h that is surely available even in msvs 2010 (as I remember a far earlier). I have no idea why they were declared localy. Looks like I forgot to mention this deviation from the original changeset.

OK, thanks.

Luckily the guys from my old job still use msvs-2008. I asked them to check presense of stdint.h, and the header was introduced exactly in msvs-2010. Looks like jdk-8 didn't use the header to provide compatibility with the compilers older than 2010, but now it does not make a sense

Copy link
Member

@phohensee phohensee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The copyright date should stay at 2018 because that's what the original commit had. Other than that, lgtm.

@apavlyutkin
Copy link
Contributor Author

The copyright date should stay at 2018 because that's what the original commit had. Other than that, lgtm.

fixed

Copy link
Member

@phohensee phohensee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, lgtm.

@openjdk
Copy link

openjdk bot commented Nov 16, 2022

@apavlyutkin This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8197859: VS2017 Complains about UINTPTR_MAX definition in globalDefinitions_VisCPP.hpp

Use <stdint.h> and <inttypes.h> on Windows instead of emulation.

Reviewed-by: phh

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 101 new commits pushed to the master branch:

  • 7ae002c: 8286582: Build fails on macos aarch64 when using --with-zlib=bundled
  • 6849667: 8284389: Improve stability of GHA Pre-submit testing by caching cygwin installer
  • 7024bf0: 8296959: Fix hotspot shell tests of 8u on multilib systems
  • 17fd40a: 8295714: GHA ::set-output is deprecated and will be removed
  • 2f509c7: 8159599: [TEST_BUG] java/awt/Modal/ModalInternalFrameTest/ModalInternalFrameTest.java
  • f6d869f: 8221529: [TESTBUG] Docker tests use old/deprecated image on AArch64
  • 3bfde7d: 8284622: Update versions of some Github Actions used in JDK workflow
  • 3a1a2e0: 8233551: [TESTBUG] SelectEditTableCell.java fails on MacOS
  • 736c1fb: 8295288: Some vm_flags tests associate with a wrong BugID
  • 0f9095f: 7124218: [TEST_BUG] [macosx] Space should select cell in the JTable
  • ... and 91 more: https://git.openjdk.org/jdk8u-dev/compare/83e90957bef15267bed792ee5d8d65899a2487e8...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@jerboaa, @phohensee) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 16, 2022
@apavlyutkin
Copy link
Contributor Author

Thank you for the review

@apavlyutkin
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Nov 17, 2022
@openjdk
Copy link

openjdk bot commented Nov 17, 2022

@apavlyutkin
Your change (at version c86b9da) is now ready to be sponsored by a Committer.

@yan-too
Copy link
Contributor

yan-too commented Nov 17, 2022

/sponsor

@openjdk
Copy link

openjdk bot commented Nov 17, 2022

Going to push as commit b98d485.
Since your change was applied there have been 101 commits pushed to the master branch:

  • 7ae002c: 8286582: Build fails on macos aarch64 when using --with-zlib=bundled
  • 6849667: 8284389: Improve stability of GHA Pre-submit testing by caching cygwin installer
  • 7024bf0: 8296959: Fix hotspot shell tests of 8u on multilib systems
  • 17fd40a: 8295714: GHA ::set-output is deprecated and will be removed
  • 2f509c7: 8159599: [TEST_BUG] java/awt/Modal/ModalInternalFrameTest/ModalInternalFrameTest.java
  • f6d869f: 8221529: [TESTBUG] Docker tests use old/deprecated image on AArch64
  • 3bfde7d: 8284622: Update versions of some Github Actions used in JDK workflow
  • 3a1a2e0: 8233551: [TESTBUG] SelectEditTableCell.java fails on MacOS
  • 736c1fb: 8295288: Some vm_flags tests associate with a wrong BugID
  • 0f9095f: 7124218: [TEST_BUG] [macosx] Space should select cell in the JTable
  • ... and 91 more: https://git.openjdk.org/jdk8u-dev/compare/83e90957bef15267bed792ee5d8d65899a2487e8...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 17, 2022
@openjdk openjdk bot closed this Nov 17, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Nov 17, 2022
@openjdk
Copy link

openjdk bot commented Nov 17, 2022

@yan-too @apavlyutkin Pushed as commit b98d485.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport integrated Pull request has been integrated
4 participants