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

8259359: javac does not attribute unexpected super constructor invocation qualifier, and may crash #2021

Closed
wants to merge 1 commit into from

Conversation

lgxbslgx
Copy link
Member

@lgxbslgx lgxbslgx commented Jan 11, 2021

Hi all,

Currently, javac doesn't attribute unexpected super constructor invocation qualifier. Please see the following code.

public class SuperConstructorCallInErrorClass extends Undefined1 {
     public SuperConstructorCallInErrorClass(int i) {
         new Undefined2() { public void test(int i) { Undefined3 u; } }.super();  //<-------------------
     }
}

The code new Undefined2() { public void test(int i) { Undefined3 u; } } isn't attributed by javac.
If we use options like -XDshould-stop.at=FLOW -XDdev, the compiler would crash.

This patch fixes it and adds the corresponding test cases.

Thank you for taking the time to review.

Best Regards.


Progress

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

Issue

  • JDK-8259359: javac does not attribute unexpected super constructor invocation qualifier, and may crash

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2021/head:pull/2021
$ git checkout pull/2021

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jan 11, 2021

👋 Welcome back lgxbslgx! 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 added the rfr label Jan 11, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jan 11, 2021

@lgxbslgx 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.

@openjdk openjdk bot added the compiler label Jan 11, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Jan 11, 2021

Webrevs

Copy link
Contributor

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

looks sensible, I like the fact that this new code is executed if the compiler has already detected an error, so we are already in recovery mode

@openjdk
Copy link

@openjdk openjdk bot commented Jan 14, 2021

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

8259359: javac does not attribute unexpected super constructor invocation qualifier, and may crash

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

  • a6b2162: 8259278: Optimize Vector API slice and unslice operations
  • da6bcf9: 8255019: Shenandoah: Split STW and concurrent mark into separate classes
  • aba3431: 8258956: Memory Leak in StringCoding on ThreadLocal resultCached StringCoding.Result
  • 8554fe6: 8253866: Security Libs Terminology Refresh
  • c2a3c7e: 8259727: Remove redundant "target" arguments to methods in Links
  • 1620664: 8259723: Move Table class to formats.html package
  • 38a1201: 8258912: Remove JVM options CountJNICalls and CountJVMCalls
  • be57cf1: 8226416: MonitorUsedDeflationThreshold can cause repeated async deflation requests
  • c822eda: 8259699: Reduce char[] copying in URLEncoder.encode(String, Charset)
  • ff3e6e4: 8259773: Incorrect encoding of AVX-512 kmovq instruction
  • ... and 97 more: https://git.openjdk.java.net/jdk/compare/65ca5c6656a36b47be9e5274f70e55f757d3c980...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 (@vicente-romero-oracle) 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 label Jan 14, 2021
@lgxbslgx
Copy link
Member Author

@lgxbslgx lgxbslgx commented Jan 14, 2021

/integrate

@openjdk openjdk bot added the sponsor label Jan 14, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jan 14, 2021

@lgxbslgx
Your change (at version 87f1063) is now ready to be sponsored by a Committer.

@lgxbslgx
Copy link
Member Author

@lgxbslgx lgxbslgx commented Jan 22, 2021

@vicente-romero-oracle Could I get your help to sponsor this patch? Thanks a lot.

@vicente-romero-oracle
Copy link
Contributor

@vicente-romero-oracle vicente-romero-oracle commented Jan 27, 2021

/sponsor

@openjdk openjdk bot closed this Jan 27, 2021
@openjdk openjdk bot added integrated and removed sponsor ready rfr labels Jan 27, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jan 27, 2021

@vicente-romero-oracle @lgxbslgx Since your change was applied there have been 289 commits pushed to the master branch:

  • 684c855: 8260524: validate-source fails on test/jdk/jdk/jfr/event/gc/detailed/TestGCLockerEvent.java
  • 311a0a9: 8259808: Add JFR event to detect GC locker stall
  • f353fcf: 8258894: C2: Forbid GCM to move stores into loops
  • ac276bb: 8257074: Update the ByteBuffers micro benchmark
  • 7ed591c: 8260314: Replace border="1" on tables with CSS
  • e696baa: 8260448: Simplify ManagementFactory$PlatformMBeanFinder
  • b3c8a52: 8259050: Error recovery in lexer could be improved
  • bf15c70: 8260460: GitHub actions still fail on Linux x86_32 with "Could not configure libc6:i386"
  • 3e4194c: 8260022: [ppc] os::print_function_and_library_name shall resolve function descriptors transparently
  • fa40a96: 8253420: Refactor HeapRegionManager::find_highest_free
  • ... and 279 more: https://git.openjdk.java.net/jdk/compare/65ca5c6656a36b47be9e5274f70e55f757d3c980...master

Your commit was automatically rebased without conflicts.

Pushed as commit 0eed2c3.

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

@lgxbslgx lgxbslgx deleted the JDK-8259359 branch Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler integrated
2 participants