-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Remove -Xverify:none from Java invocations #11381
Comments
I found it in the following locations: bazel/src/main/java/com/google/devtools/build/lib/analysis/actions/SpawnAction.java Line 1036 in ff58081
bazel/src/main/java/com/google/devtools/build/lib/rules/java/JavaHeaderCompileActionBuilder.java Line 341 in 0816a7d
There might be more. |
The motivation was to improve startup performance of host tools that we trust. The hard-coded flags for JavaBuilder and turbine were made obsolete by I don't know a replacement for I don't have any concerns with trying to remove these. |
Echoing @cushon's opinion, at the very least, this should not be hardcoded into Bazel itself but in the individual Java toolchains. |
corresponding to `javabuilder_jvm_opts` and `turbine_jvm_opts`, to allow tool-specific inputs. Currently the only way to specify additional inputs is with the shared `tools` attribute, which means the Class Data Sharing archives for JavaBuilder and Turbine are both passed when invoking either tool. Also refactor the handling of the tool-specific inputs into 'JavaToolchainTool', which encapsulates the deploy jars, jvm flags, and data inputs for each tool. Also, stop hard-coding `-X:verifyNone` in a couple of places. It's explicitly configured in our `java_toolchain`, and hard-coding it in Bazel was never a good idea (see e.g. #11381). PiperOrigin-RevId: 346151606
The motivation was to improve startup performance of host tools that we trust. The hard-coded flags for JavaBuilder and turbine were made obsolete by `java_toolchain.jvm_opts`, which allows them to be configured in the toolchain instead. The option has been deprecated in Java 13 and will be removed in a future release. Fixes bazelbuild/bazel#11381 PiperOrigin-RevId: 346160835
Description of the problem / feature request:
Bazel currently add
-Xverify:none
to Java commands it executes.Feature requests: what underlying problem are you trying to solve with this feature?
This is a dangerous option because it disables the byte code verifier. Having the option in place without justification/documentation reduces trust of our developers/users.
The option has been deprecated in Java 13 and will be removed in a future release.
Please remove the option.
Alternatively please provide a flag to disable it and add documentation why it's needed and what the risks are of removing/disabling
-Xverify:none
with regards to Bazel.The text was updated successfully, but these errors were encountered: