JDK-8282797 : `CompileCommand` Parsing Errors Should Exit VM
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-03-08
  • Updated: 2024-02-16
  • Resolved: 2023-06-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22
22 b02Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8309190 :  
Description
Currently, errors during compile command parsing just print an error but don't exit the VM (see CompilerOracle::print_parse_error). As a result, issues like JDK-8282715 go unnoticed.

We should change this to exit the VM.
Comments
Changeset: c0527561 Author: Tobias Holenstein <tholenstein@openjdk.org> Date: 2023-06-09 13:01:02 +0000 URL: https://git.openjdk.org/jdk/commit/c052756154603a9d3a13200fa407a2dc124437f3
09-06-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/13753 Date: 2023-05-02 11:35:54 +0000
23-05-2023

The reason for me not fixing this before, was the fear of breaking old applications. But I did add exit-on-error for compiler directives because I think that is the better alternative. So the question for me is - how can we add exit-on-error for compile commands without breaking stuff - or as little as possible. One idea could be do add the functionality and guard it with a flag, and have it on as a default for debug builds. In that way we will have most of the benefit (when testing and debugging), but without breaking anything that runs in production. (On a second note - the same goes for CompileCommand=option - I would like to remove it now that it's redundant. Maybe we could remove it for debug builds as a start too.) Hopefully this strategy will encourage developers to fix the production environments over time - because the end goal is to actually be able to remove stuff.
14-03-2022

Yes, I think it's worth it and "fixing" the application requires minimal effort. Of course, one option would be to only exit the VM with debug builds. [~neliasso], what do you think?
09-03-2022

hi, Tobias, This is a disruptive change. Applications with wrong compiler directives may have been running for years. if we change this behavior, we will break them, even with a good intention. is it worth it?
08-03-2022