{"record":{"id":"9724074442e2031e","repo":"openjdk/jdk","slug":"error-parsing-long-s","errorCode":null,"errorMessage":"Error parsing long: %s\n","messagePattern":"Error parsing long: (.+?)\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/hotspot/share/ci/ciReplay.cpp","lineNumber":1067,"sourceCode":"      case T_SHORT: {\n        int value = atoi(string_value);\n        _vt->short_field_put(fd->offset(), value);\n        break;\n      }\n      case T_CHAR: {\n        int value = atoi(string_value);\n        _vt->char_field_put(fd->offset(), value);\n        break;\n      }\n      case T_INT: {\n        int value = atoi(string_value);\n        _vt->int_field_put(fd->offset(), value);\n        break;\n      }\n      case T_LONG: {\n        jlong value;\n        if (sscanf(string_value, JLONG_FORMAT, &value) != 1) {\n          fprintf(stderr, \"Error parsing long: %s\\n\", string_value);\n          break;\n        }\n        _vt->long_field_put(fd->offset(), value);\n        break;\n      }\n      case T_FLOAT: {\n        float value = atof(string_value);\n        _vt->float_field_put(fd->offset(), value);\n        break;\n      }\n      case T_DOUBLE: {\n        double value = atof(string_value);\n        _vt->double_field_put(fd->offset(), value);\n        break;\n      }\n      case T_ARRAY:\n      case T_OBJECT:\n        if (fd->is_null_free_inline_type() && fd->is_flat()) {","sourceCodeStart":1049,"sourceCodeEnd":1085,"githubUrl":"https://github.com/openjdk/jdk/blob/88dfb74bbeefcf2b0aa11835183bcd949998fc8f/src/hotspot/share/ci/ciReplay.cpp#L1049-L1085","documentation":"While replaying a recorded compilation, ciReplay sets fields of an inline-type (value class) instance from the replay data (_vt->long_field_put). For a T_LONG field, sscanf(string_value, JLONG_FORMAT, &value) failed to parse the recorded textual value, so the message prints the offending string and the case breaks without setting the field — the field keeps its default value, making the replayed compilation potentially differ from the original.","triggerScenarios":"A replay data file whose 'field ... J <value>' line for an inline-type long field contains something that does not match JLONG_FORMAT (%lld for 64-bit) — e.g. a hand-edited file, a value like '0x1234' with no hex support, 'null', an empty string, or a file truncated/corrupted mid-line.","commonSituations":"Manually editing replay files to bisect a compiler bug; replay files written by a JVM of a different version/architecture (32-bit %ld vs 64-bit formats); locale or whitespace damage to the file; transferring the file through a tool that mangles long lines.","solutions":["Open the replay file and locate the long value string shown in the message; check it is a plain decimal (optionally signed) 64-bit integer","Fix the value by hand to decimal form, or regenerate the replay file from the original reproducing JVM","Ensure the replay file was produced and consumed by the same JDK build (JLONG_FORMAT differs between platforms/versions)","Re-run replay with -XX:+ReplayCompiles -XX:ReplayDataFile=<fixed file>"],"exampleFix":"# before (replay file line)\nfield com/foo/Point J 0x7fffffffffffffff\n\n# after\nfield com/foo/Point J 9223372036854775807","handlingStrategy":"validation","validationCode":"# Sanity-check all long field records in a replay file before running it:\ngrep -nE '^(field|staticfield).* J ' replay.log | grep -vE ' J -?[0-9]+$' \\\n  && echo 'malformed long values found' || echo 'long fields OK'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never hand-edit numeric fields into hex/float notation; keep signed decimal","Regenerate replay files on the same JDK build being used for replay","Treat any stderr noise during replay as a sign the replay diverges from the recorded compilation"],"tags":["hotspot","cireplay","compiler","parsing","diagnostics"],"backgroundTag":null,"analyzedSha":"88dfb74bbeefcf2b0aa11835183bcd949998fc8f","analyzedAt":"2026-08-14T11:45:09.665Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}