{"record":{"id":"906854c86820087c","repo":"golang/go","slug":"relocation-number-d-symbol-index-idx-d-cannot-be","errorCode":null,"errorMessage":"relocation number %d symbol index idx=%d cannot be large then number of symbols %d","messagePattern":"relocation number (.+?) symbol index idx=(.+?) cannot be large then number of symbols (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cmd/link/internal/loadpe/ldpe.go","lineNumber":352,"sourceCode":"\t\t}\n\t\tif rsect.NumberOfRelocations == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tif rsect.Characteristics&pe.IMAGE_SCN_MEM_DISCARDABLE != 0 {\n\t\t\tcontinue\n\t\t}\n\t\tif rsect.Characteristics&(pe.IMAGE_SCN_CNT_CODE|pe.IMAGE_SCN_CNT_INITIALIZED_DATA|pe.IMAGE_SCN_CNT_UNINITIALIZED_DATA) == 0 {\n\t\t\t// This has been seen for .idata sections, which we\n\t\t\t// want to ignore. See issues 5106 and 5273.\n\t\t\tcontinue\n\t\t}\n\n\t\tsplitResources := strings.HasPrefix(rsect.Name, \".rsrc$\")\n\t\tissehsect := issehsect(arch, rsect)\n\t\tsb := l.MakeSymbolUpdater(state.sectsyms[rsect])\n\t\tfor j, r := range rsect.Relocs {\n\t\t\tif int(r.SymbolTableIndex) >= len(f.COFFSymbols) {\n\t\t\t\treturn nil, fmt.Errorf(\"relocation number %d symbol index idx=%d cannot be large then number of symbols %d\", j, r.SymbolTableIndex, len(f.COFFSymbols))\n\t\t\t}\n\t\t\tpesym := &f.COFFSymbols[r.SymbolTableIndex]\n\t\t\t_, rSym, err := state.readpesym(pesym)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tif rSym == 0 {\n\t\t\t\tname, err := pesym.FullName(f.StringTable)\n\t\t\t\tif err != nil {\n\t\t\t\t\tname = string(pesym.Name[:])\n\t\t\t\t}\n\t\t\t\treturn nil, fmt.Errorf(\"reloc of invalid sym %s idx=%d type=%d\", name, r.SymbolTableIndex, pesym.Type)\n\t\t\t}\n\n\t\t\trSize := uint8(4)\n\t\t\trOff := int32(r.VirtualAddress)\n\t\t\tvar rType objabi.RelocType\n\t\t\tswitch arch.Family {","sourceCodeStart":334,"sourceCodeEnd":370,"githubUrl":"https://github.com/golang/go/blob/b6b368adc57c96c3151d224d172029f233ead2c3/src/cmd/link/internal/loadpe/ldpe.go#L334-L370","documentation":"Error \"relocation number %d symbol index idx=%d cannot be large then number of symbols %d\" thrown in golang/go.","triggerScenarios":"Thrown at src/cmd/link/internal/loadpe/ldpe.go:352 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b6b368adc57c96c3151d224d172029f233ead2c3","analyzedAt":"2026-08-12T00:22:02.250Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}