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

8274347: Passing a *nested* switch expression as a parameter causes an NPE during compile #5836

Closed
wants to merge 2 commits into from

Conversation

@lahodaj
Copy link
Contributor

@lahodaj lahodaj commented Oct 6, 2021

Switch handling needs to compute if a case's statements complete normally or not (this is used on multiple places later in the pipeline). But, especially during speculative attributions, the tree may not be fully attributed. preFlow should be invoked before invoking flow. The patch also fixes binding pattern handling in preFlow/postAttr.


Progress

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

Issue

  • JDK-8274347: Passing a nested switch expression as a parameter causes an NPE during compile

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5836

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Oct 6, 2021

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

Loading

@openjdk openjdk bot added the rfr label Oct 6, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Oct 6, 2021

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

  • compiler

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.

Loading

@openjdk openjdk bot added the compiler label Oct 6, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Oct 6, 2021

Webrevs

Loading

Copy link
Contributor

@vicente-romero-oracle vicente-romero-oracle left a comment

looks sensible to me

Loading

@@ -1800,6 +1800,7 @@ private void handleSwitch(JCTree switchTree,
}
addVars(c.stats, switchEnv.info.scope);

preFlow(c);
Copy link
Contributor

@vicente-romero-oracle vicente-romero-oracle Oct 6, 2021

Choose a reason for hiding this comment

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

this makes sense, we are doing the same for lambdas

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Oct 6, 2021

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

8274347: Passing a *nested* switch expression as a parameter causes an NPE during compile

Reviewed-by: vromero

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

  • c10de35: 8262944: Improve exception message when automatic module lists provider class not in JAR file
  • b8af6a9: 8273917: Remove 'leaf' ranking for Mutex
  • c80a612: 8273381: Assert in PtrQueueBufferAllocatorTest.stress_free_list_allocator_vm
  • 9759fcb: 8274496: Use String.contains() instead of String.indexOf() in java.desktop
  • cdf8930: 8274625: Search field placeholder behavior
  • df125f6: 8273410: IR verification framework fails with "Should find method name in validIrRulesMap"
  • c74726d: 8274730: AArch64: AES/GCM acceleration is broken by the fix for JDK-8273297
  • 2faced0: 8274738: ZGC: Use relaxed atomic load when reading bits in the live map
  • 8a4d2b4: 8274680: Remove unnecessary conversion to String in java.desktop
  • 986ee5d: 8274670: Improve version string handling in SA
  • ... and 20 more: https://git.openjdk.java.net/jdk/compare/8f7a37c92f5713f7728f54d4a5924484a535e968...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.

Loading

@openjdk openjdk bot added the ready label Oct 6, 2021
@lahodaj
Copy link
Contributor Author

@lahodaj lahodaj commented Oct 11, 2021

/integrate

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Oct 11, 2021

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

  • 110e38d: 8274753: ZGC: SEGV in MetaspaceShared::link_shared_classes
  • b7af890: 8274430: Remove some debug error printing code added in JDK-8017163
  • aaf2401: 8274927: Remove unnecessary G1ArchiveAllocator code
  • c55dd36: 8275008: gtest build failure due to stringop-overflow warning with gcc11
  • 3edee1e: 8272723: Don't use Access API to access primitive fields
  • 49f8ce6: 8274773: [TESTBUG] UnsafeIntrinsicsTest intermittently fails on weak memory model platform
  • c032186: 8272968: AArch64: Remove redundant matching rules for commutative ops
  • a05873a: 8274952: jdk/jfr/api/consumer/TestRecordedFrameType.java failed when c1 disabled
  • 5ecc99b: 8274620: resourcehogs/serviceability/sa/TestHeapDumpForLargeArray.java is timing out
  • 2ff3977: 8275004: CDS build failure with gcc11
  • ... and 66 more: https://git.openjdk.java.net/jdk/compare/8f7a37c92f5713f7728f54d4a5924484a535e968...master

Your commit was automatically rebased without conflicts.

Loading

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

@openjdk openjdk bot commented Oct 11, 2021

@lahodaj Pushed as commit b870468.

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

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants