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

8266176: -Wmaybe-uninitialized happens in libArrayIndexOutOfBoundsExceptionTest.c #3744

Closed
wants to merge 2 commits into from

Conversation

YaSuenag
Copy link
Member

@YaSuenag YaSuenag commented Apr 28, 2021

We can see some compiler warnings in libArrayIndexOutOfBoundsExceptionTest.c as following on GCC 11. content should be initialized.

/home/ysuenaga/git-forked/jdk/test/hotspot/jtreg/runtime/exceptionMsgs/ArrayIndexOutOfBoundsException/libArrayIndexOutOfBoundsExceptionTest.c: In function 'Java_ArrayIndexOutOfBoundsExceptionTest_doNativeBooleanArrayRegionStore':
/home/ysuenaga/git-forked/jdk/test/hotspot/jtreg/runtime/exceptionMsgs/ArrayIndexOutOfBoundsException/libArrayIndexOutOfBoundsExceptionTest.c:51:4: warning: 'content' may be used uninitialized [-Wmaybe-uninitialized]
   51 | (*env)->Set##NameType##ArrayRegion(env, array, start, len, content); \
      | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ysuenaga/git-forked/jdk/test/hotspot/jtreg/runtime/exceptionMsgs/ArrayIndexOutOfBoundsException/libArrayIndexOutOfBoundsExceptionTest.c:54:1: note: in expansion of macro 'REGIONACCESS'
   54 | REGIONACCESS(jboolean, Boolean)
      | ^~~~~~~~~~~~

Progress

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

Issue

  • JDK-8266176: -Wmaybe-uninitialized happens in libArrayIndexOutOfBoundsExceptionTest.c

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3744/head:pull/3744
$ git checkout pull/3744

Update a local copy of the PR:
$ git checkout pull/3744
$ git pull https://git.openjdk.java.net/jdk pull/3744/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3744

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3744.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 28, 2021

👋 Welcome back ysuenaga! 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
Copy link

openjdk bot commented Apr 28, 2021

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

  • hotspot-runtime

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-runtime label Apr 28, 2021
@YaSuenag YaSuenag marked this pull request as ready for review Apr 28, 2021
@openjdk openjdk bot added the rfr label Apr 28, 2021
@mlbridge
Copy link

mlbridge bot commented Apr 28, 2021

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Seems okay.

Thanks,
David

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
Copy link
Member

@dholmes-ora dholmes-ora Apr 28, 2021

Choose a reason for hiding this comment

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

Oracle copyright uses a two year format so this should be "2019, 2021,"

Copy link
Member Author

@YaSuenag YaSuenag Apr 28, 2021

Choose a reason for hiding this comment

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

Thanks @dholmes-ora for the review!
I updated copyright year in new commit.

@openjdk
Copy link

openjdk bot commented Apr 28, 2021

@YaSuenag 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:

8266176: -Wmaybe-uninitialized happens in libArrayIndexOutOfBoundsExceptionTest.c

Reviewed-by: dholmes

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 24 new commits pushed to the master branch:

  • 343a4a7: 8185127: Add tests to cover hashCode() method for java supported crypto key types
  • e325a75: 8264593: debug.cpp utilities should be available in product builds.
  • e879f8c: 8265587: IGV: track nodes across matching
  • 164454f: 8265867: thread.hpp defines some enums but no reference
  • 75a2354: 8266028: C2 computes -0.0 for Math.pow(-0.0, 0.5)
  • ca37be1: 8197800: Test java/awt/Focus/NonFocusableWindowTest/NoEventsTest.java fails on Windows
  • cf92693: 8198619: java/awt/Focus/FocusTraversalPolicy/ButtonGroupLayoutTraversal/ButtonGroupLayoutTraversalTest.java fails on mac
  • 2201e11: 8266055: ZGC: ZHeap::print_extended_on() doesn't disable deferred delete
  • ce48f04: 8198617: java/awt/Focus/6382144/EndlessLoopTest.java fails on mac
  • 0438cea: 8136517: [macosx]Test java/awt/Focus/8073453/AWTFocusTransitionTest.java fails on MacOSX
  • ... and 14 more: https://git.openjdk.java.net/jdk/compare/7f4a9f68bfd6fd002f79ac989155550db0bcdd20...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.

➡️ 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 label Apr 28, 2021
@YaSuenag
Copy link
Member Author

YaSuenag commented Apr 29, 2021

/integrate

@openjdk openjdk bot closed this Apr 29, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Apr 29, 2021
@openjdk
Copy link

openjdk bot commented Apr 29, 2021

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

  • 155da25: 8265005: Introduce the new client property for mac: apple.awt.windowTitleVisible
  • 91226fa: 8265940: Enable C2's optimization for Math.pow(x, 0.5) on all platforms
  • 56cde70: 8266265: mark hotspot compiler/vectorization tests which ignore VM flags
  • 4937214: 8266174: -Wmisleading-indentation happens in libmlib_image sources
  • b305eff: 8266238: mark hotspot compiler/inlining tests which ignore VM flags
  • df3b2d0: 8266264: mark hotspot compiler/eliminateAutobox tests which ignore VM flags
  • 6b263e6: 8266256: compiler.vectorization.TestBufferVectorization does testing twice
  • 69155f4: 8266231: mark hotspot compiler/c1 tests which ignore VM flags
  • 0e225ef: 8197821: Test java/awt/font/TextLayout/LigatureCaretTest.java fails on Windows
  • a1c942c: 8266170: -Wnonnull happens in classLoaderData.inline.hpp
  • ... and 44 more: https://git.openjdk.java.net/jdk/compare/7f4a9f68bfd6fd002f79ac989155550db0bcdd20...master

Your commit was automatically rebased without conflicts.

Pushed as commit 39abac9.

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

@YaSuenag YaSuenag deleted the JDK-8266176 branch May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-runtime integrated
2 participants