{"record":{"id":"0466d59c5bf5b635","repo":"golang/go","slug":"s-v-sectnum-0","errorCode":null,"errorMessage":"%s: %v: sectnum < 0!","messagePattern":"(.+?): (.+?): sectnum < 0!","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cmd/link/internal/loadpe/ldpe.go","lineNumber":534,"sourceCode":"\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tif pesym.SectionNumber == 0 { // extern\n\t\t\tif l.SymType(s) == sym.SXREF && pesym.Value > 0 { // global data\n\t\t\t\tbld = makeUpdater(l, bld, s)\n\t\t\t\tbld.SetType(sym.SNOPTRDATA)\n\t\t\t\tbld.SetSize(int64(pesym.Value))\n\t\t\t}\n\n\t\t\tcontinue\n\t\t} else if pesym.SectionNumber > 0 && int(pesym.SectionNumber) <= len(f.Sections) {\n\t\t\tsect = f.Sections[pesym.SectionNumber-1]\n\t\t\tif _, found := state.sectsyms[sect]; !found {\n\t\t\t\treturn nil, fmt.Errorf(\"%s: %v: missing sect.sym\", pn, s)\n\t\t\t}\n\t\t} else {\n\t\t\treturn nil, fmt.Errorf(\"%s: %v: sectnum < 0!\", pn, s)\n\t\t}\n\n\t\tif sect == nil {\n\t\t\treturn nil, nil\n\t\t}\n\n\t\t// Check for COMDAT symbol.\n\t\tif sz, ok1 := state.comdats[uint16(pesym.SectionNumber-1)]; ok1 {\n\t\t\tif psz, ok2 := comdatDefinitions[l.SymName(s)]; ok2 {\n\t\t\t\tif sz == psz {\n\t\t\t\t\t//  OK to discard, we've seen an instance\n\t\t\t\t\t// already.\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif l.OuterSym(s) != 0 {\n\t\t\tif l.AttrDuplicateOK(s) {","sourceCodeStart":516,"sourceCodeEnd":552,"githubUrl":"https://github.com/golang/go/blob/b6b368adc57c96c3151d224d172029f233ead2c3/src/cmd/link/internal/loadpe/ldpe.go#L516-L552","documentation":"Error \"%s: %v: sectnum < 0!\" thrown in golang/go.","triggerScenarios":"Thrown at src/cmd/link/internal/loadpe/ldpe.go:534 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"b6b368adc57c96c3151d224d172029f233ead2c3","analyzedAt":"2026-08-12T00:22:02.250Z","schemaVersion":2},"datasetVersion":"2026-08-12T06:17:24.410Z"}