{"record":{"id":"968e28a2b7f943f8","repo":"openjdk/jdk","slug":"error-node-is-null","errorCode":null,"errorMessage":"error: node is null\n","messagePattern":"error: node is null\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"src/hotspot/share/adlc/archDesc.cpp","lineNumber":559,"sourceCode":"  leftstr = rightstr = nullptr;\n  // Do not process leaves of the Match Tree if they are not ideal\n  if ((node) && (node->_lChild == nullptr) && (node->_rChild == nullptr) &&\n      ((form = (Form *)_globalNames[node->_opType]) != nullptr) &&\n      (!form->ideal_only())) {\n    return;\n  }\n\n  // Identify index position among ideal operands\n  intptr_t index = _last_opcode;\n  const char *indexStr = node ? node->_opType : (char *) \" \";\n  index = (intptr_t)_idealIndex[indexStr];\n  if (index == 0) {\n    fprintf(stderr, \"error: operand \\\"%s\\\" not found\\n\", indexStr);\n    assert(0, \"fatal error\");\n  }\n\n  if (node == nullptr) {\n    fprintf(stderr, \"error: node is null\\n\");\n    assert(0, \"fatal error\");\n  }\n  // Build MatchLists for children\n  // Check each child for an internal operand name, and use that name\n  // for the parent's matchlist entry if it exists\n  mnode = node->_lChild;\n  if (mnode) {\n    buildMList(mnode, nullptr, nullptr, nullptr, nullptr);\n    leftstr = mnode->_internalop ? mnode->_internalop : mnode->_opType;\n  }\n  mnode = node->_rChild;\n  if (mnode) {\n    buildMList(mnode, nullptr, nullptr, nullptr, nullptr);\n    rightstr = mnode->_internalop ? mnode->_internalop : mnode->_opType;\n  }\n  // Grab the string for the opcode of this list entry\n  if (rootOp == nullptr) {\n    opcode = (node->_internalop) ? node->_internalop : node->_opType;","sourceCodeStart":541,"sourceCodeEnd":577,"githubUrl":"https://github.com/openjdk/jdk/blob/88dfb74bbeefcf2b0aa11835183bcd949998fc8f/src/hotspot/share/adlc/archDesc.cpp#L541-L577","documentation":"ArchDesc::buildMList internal check: a null MatchRule node reached the list builder ('error: node is null'). buildMList is invoked with node == nullptr from a caller that should always pass a child rule; note the code already dereferences node->_opType above for the index lookup, so in practice the preceding lookup crash/error usually fires first — this message marks a structural inconsistency in the match-rule tree built by the parser.","triggerScenarios":"A malformed or truncated match rule (parser produced a rule with missing children), or ADLC caller logic passing null where a child rule was expected (buildMList(mnode, ...) recursion with an absent child).","commonSituations":"Editing match-rule nesting by hand and dropping a child operand; .ad merge conflicts leaving a half-formed rule; almost always accompanied by [94] or a syntax error that is the true cause.","solutions":["Fix the syntax/operand errors reported earlier in the log first; this message is usually secondary","Check the flagged instruction's match rule has a well-formed '( result operand )' tree with both children present","Restore the rule from a known-good revision and reapply the edit"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"make adlc 2>&1 | grep -cE 'syntax error|operand .* not found' # nonzero => fix primary errors; 'node is null' is secondary","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always fix syntax/operand errors first; null-node is fallout","Give every match rule a complete '( result child... )' tree","Recover .ad files from version control after bad merges"],"tags":["adlc","match-rule","internal-error","build","hotspot"],"backgroundTag":null,"analyzedSha":"88dfb74bbeefcf2b0aa11835183bcd949998fc8f","analyzedAt":"2026-08-14T11:45:09.665Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}