Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

8261310: PPC64 Zero build fails with 'VMError::controlled_crash(int)::FunctionDescriptor functionDescriptor' has incomplete type and cannot be defined #23

Closed
wants to merge 1 commit into from

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Feb 8, 2021

Note this is not a backport, but 16u-specific change.

$ CONF=linux-ppc64-zero-fastdebug make hotspot

/home/shade/trunks/jdk16/src/hotspot/share/utilities/vmError.cpp: In static member function 'static void VMError::controlled_crash(int)':
/home/shade/trunks/jdk16/src/hotspot/share/utilities/vmError.cpp:1799:29: error: aggregate 'VMError::controlled_crash(int)::FunctionDescriptor functionDescriptor' has incomplete type and cannot be defined
 1799 | struct FunctionDescriptor functionDescriptor;
      | ^~~~~~~~~~~~~~~~~~

FunctionDescriptor is from src/hotspot/cpu/ppc/assembler_ppc.hpp, and obviously not available for Zero.

The affected code was removed by JDK-8252148 in 17, so this issue affects versions below it.
While not exactly the regression for 16, it would be nice to have this fixed for 16 and lower, to get clean builds on all platform configurations, including JDK 16 GA.

The fix is trivial:

diff --git a/src/hotspot/share/utilities/vmError.cpp b/src/hotspot/share/utilities/vmError.cpp
index 9b0dc413bcd..476fdc48e43 100644
--- a/src/hotspot/share/utilities/vmError.cpp
+++ b/src/hotspot/share/utilities/vmError.cpp
@@ -1795,7 +1795,7 @@ void VMError::controlled_crash(int how) {
   char * const dataPtr = NULL; // bad data pointer
   const void (*funcPtr)(void); // bad function pointer
 
-#if defined(PPC64) && !defined(ABI_ELFv2)
+#if defined(PPC64) && !defined(ABI_ELFv2) && !defined(ZERO)
   struct FunctionDescriptor functionDescriptor;
 
   functionDescriptor.set_entry((address) 0xF);

Additional testing:

  • Linux Zero PPC64 fastdebug build

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8261310: PPC64 Zero build fails with 'VMError::controlled_crash(int)::FunctionDescriptor functionDescriptor' has incomplete type and cannot be defined

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk16u pull/23/head:pull/23
$ git checkout pull/23

…:FunctionDescriptor functionDescriptor' has incomplete type and cannot be defined
@bridgekeeper
Copy link

bridgekeeper bot commented Feb 8, 2021

👋 Welcome back shade! 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.

@mlbridge
Copy link

mlbridge bot commented Feb 8, 2021

Webrevs

Copy link
Member

@tstuefe tstuefe left a comment

Choose a reason for hiding this comment

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

Still good and trivial.

@openjdk
Copy link

openjdk bot commented Feb 8, 2021

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

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

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

8261310: PPC64 Zero build fails with 'VMError::controlled_crash(int)::FunctionDescriptor functionDescriptor' has incomplete type and cannot be defined

Reviewed-by: stuefe, iklam

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 8, 2021
@shipilev
Copy link
Member Author

/integrate

@openjdk openjdk bot closed this Feb 15, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Feb 15, 2021
@openjdk
Copy link

openjdk bot commented Feb 15, 2021

@shipilev Since your change was applied there have been 10 commits pushed to the master branch:

  • c82a994: 8259628: jdk/net/ExtendedSocketOption/AsynchronousSocketChannelNAPITest.java fails intermittently
  • b6db9a5: 8198540: Dynalink leaks memory when generating type converters
  • 988dfa8: 8260380: Upgrade to LittleCMS 2.12
  • 6c6c6e6: 8249867: xml declaration is not followed by a newline
  • ad5d4e9: Merge
  • 4de3a6b: 8260709: C2: assert(false) failed: unscheduable graph
  • 5307afa: 8260585: AArch64: Wrong code generated for shifting right and accumulating four unsigned short integers
  • 1a7040e: 8259794: Remove EA from JDK 16 version string starting with Initial RC promotion on Feb 04, 2021(B35)
  • afd5eef: 8260704: ParallelGC: oldgen expansion needs release-store for _end
  • 081fa3e: 8260927: StringBuilder::insert is incorrect without Compact Strings

Your commit was automatically rebased without conflicts.

Pushed as commit cc3417d.

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

@shipilev shipilev deleted the JDK-8261310-ppc64-zero branch March 9, 2021 12:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
integrated Pull request has been integrated
3 participants