{"record":{"id":"f81b44510cca4b86","repo":"oracle/graal","slug":"xverify-mode-can-be-none-remote-or-all","errorCode":null,"errorMessage":"-Xverify: Mode can be 'none', 'remote' or 'all'.","messagePattern":"-Xverify: Mode can be 'none', 'remote' or 'all'\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/EspressoOptions.java","lineNumber":309,"sourceCode":"    @Option(help = \"Force mimicking of hotspot behavior on unrespected specs points\", //\n                    category = OptionCategory.EXPERT, //\n                    stability = OptionStability.EXPERIMENTAL, //\n                    usageSyntax = \"hotspot|strict\") //\n    public static final OptionKey<SpecComplianceMode> SpecCompliance = new OptionKey<>(SpecComplianceMode.HOTSPOT, SPEC_COMPLIANCE_OPTION_TYPE);\n\n    public enum VerifyMode {\n        NONE,\n        REMOTE, // Verifies all bytecodes not loaded by the bootstrap class loader.\n        ALL\n    }\n\n    private static final OptionType<VerifyMode> VERIFY_MODE_OPTION_TYPE = new OptionType<>(\"VerifyMode\", new Function<String, VerifyMode>() {\n        @Override\n        public VerifyMode apply(String s) {\n            try {\n                return VerifyMode.valueOf(s.toUpperCase(Locale.ROOT));\n            } catch (IllegalArgumentException e) {\n                throw new IllegalArgumentException(\"-Xverify: Mode can be 'none', 'remote' or 'all'.\");\n            }\n        }\n    });\n\n    @Option(help = \"Sets the mode of the bytecode verifier.\", //\n                    category = OptionCategory.EXPERT, //\n                    stability = OptionStability.STABLE, //\n                    usageSyntax = \"remote|none|all\" //\n    ) //\n    public static final OptionKey<VerifyMode> Verify = new OptionKey<>(VerifyMode.REMOTE, VERIFY_MODE_OPTION_TYPE);\n\n    @Option(help = \"Replace regular expression engine with a TRegex implementation.\", //\n                    category = OptionCategory.USER, //\n                    stability = OptionStability.EXPERIMENTAL, //\n                    usageSyntax = \"true|false\") //\n    public static final OptionKey<Boolean> UseTRegex = new OptionKey<>(false);\n\n    @Option(help = \"Speculatively inline field accessors.\", //","sourceCodeStart":291,"sourceCodeEnd":327,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/EspressoOptions.java#L291-L327","documentation":"The OptionType converter for -Xverify (java.Verify) maps the string to VerifyMode.NONE/REMOTE/ALL via valueOf and throws when parsing fails. This mirrors the HotSpot -Xverify flag controlling bytecode verification.","triggerScenarios":"Passing -Xverify (java.Verify context option) with a value other than none/remote/all, e.g. '-Xverify:false' or '-Xverify none' (space form handled elsewhere, so the colon form reaching the converter fails).","commonSituations":"Reusing standard JVM flags verbatim (-Xverify:false is very common in Maven/Gradle JVM startup args); tools that forward JAVA_TOOL_OPTIONS to Espresso.","solutions":["Use one of the accepted values: -Xverify=remote (default), -Xverify=none, or -Xverify=all.","Replace -Xverify:false with -Xverify:none.","Strip standard HotSpot-only flags from scripts that launch Espresso."],"exampleFix":"# before\njava -Xverify:false ...\n\n# after\njava -Xverify=none ...","handlingStrategy":"validation","validationCode":"if (!Set.of(\"none\", \"remote\", \"all\").contains(verifyMode.toLowerCase(Locale.ROOT))) {\n    throw new IllegalArgumentException(\"Xverify must be none|remote|all\");\n}","typeGuard":"static boolean validXverify(String s) {\n    return s != null && s.matches(\"(?i)(none|remote|all)\");\n}","tryCatchPattern":null,"preventionTips":["Translate HotSpot flags before forwarding: -Xverify:false -> -Xverify=none.","Keep a list of supported JVM flags for Espresso launches.","Validate flags in CI before deployment."],"tags":["espresso","graalvm","configuration","options","verification"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}