{"record":{"id":"35e40ee2ff05f4d4","repo":"oracle/graal","slug":"unsupported-option-automaticreferencehandling","errorCode":null,"errorMessage":"Unsupported option: AutomaticReferenceHandling","messagePattern":"Unsupported option: AutomaticReferenceHandling","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"espresso/src/com.oracle.truffle.espresso.mokapot/src/mokapot.c","lineNumber":2158,"sourceCode":"        return \"-Xmx128m\";\n    } else {\n        return option_str;\n    }\n}\n\nstatic jint process_isolate_args(JavaVMInitArgs *initArgs, int *isolate_argc, char ***isolate_argv, int *n_ignored_indices, int **ignored_indices) {\n    // Pull out arguments that need to be handled by isolate creation in SVM and can't be set correctly later\n    // Mark those as ignored so that Espresso_CreateJavaVM knows not to act on them\n    // but still uses them to compose the jvm args as seen by management APIs\n\n    jboolean auto_adjust_heap_size = JNI_TRUE;\n    for (int i = 0; i < initArgs->nOptions; i++) {\n        const JavaVMOption *option = initArgs->options + i;\n        char *optionString = NULL;\n        if (option_starts_with(\"-XX:\", option)) {\n            if (option->optionString[4] == '-' || option->optionString[4] == '+') {\n                if (strcmp(\"AutomaticReferenceHandling\", option->optionString + 5) == 0) {\n                    fprintf(stderr, \"Unsupported option: AutomaticReferenceHandling\" OS_NEWLINE_STR);\n                    return JNI_ERR;\n                } else if (strcmp(\"AutoAdjustHeapSize\", option->optionString + 5) == 0) {\n                    auto_adjust_heap_size = option->optionString[4] == '+' ? JNI_TRUE : JNI_FALSE;\n                } else if (probe_option_type(option->optionString + 5) == OPTION_BOOLEAN) {\n                    optionString = option->optionString;\n                } else {\n                    continue;\n                }\n            } else if (option_starts_with(\"-XX:MaxHeapSize=\", option)) {\n                optionString = maybe_adjust_max_heap_size(option->optionString, strlen(\"-XX:MaxHeapSize=\"), auto_adjust_heap_size);\n            } else if (probe_option_type(option->optionString + 4) == OPTION_STRING) {\n                optionString = option->optionString;\n            } else {\n                continue;\n            }\n        } else if (option_starts_with(\"-Xms\", option) || option_starts_with(\"-Xmn\", option)) {\n            optionString = option->optionString;\n        } else if (option_starts_with(\"-Xmx\", option)) {","sourceCodeStart":2140,"sourceCodeEnd":2176,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/espresso/src/com.oracle.truffle.espresso.mokapot/src/mokapot.c#L2140-L2176","documentation":"Error \"Unsupported option: AutomaticReferenceHandling\" thrown in oracle/graal.","triggerScenarios":"Thrown at espresso/src/com.oracle.truffle.espresso.mokapot/src/mokapot.c:2158 when the library encounters an invalid state.","commonSituations":"Occurs when a caller violates the contract guarded by this check: Unsupported option: AutomaticReferenceHandling","solutions":["Fix the condition reported by the error: Unsupported option: AutomaticReferenceHandling","Check the throwing call site and ensure its documented preconditions (argument values, types, environment, or configuration) are satisfied before the call."],"exampleFix":"Validate inputs and environment so that the failing condition does not occur: Unsupported option: AutomaticReferenceHandling","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}