{"record":{"id":"3a0e01d7e82c56c1","repo":"FuelLabs/sway","slug":"non-configurable-found-in-configurables-region-of","errorCode":null,"errorMessage":"non-configurable found in configurables region of the data section","messagePattern":"non-configurable found in configurables region of the data section","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sway-core/src/asm_generation/finalized_asm.rs","lineNumber":323,"sourceCode":"\n        for (i, entry) in data_section.iter_all_entries().enumerate() {\n            let entry_offset = data_section.absolute_idx_to_offset(i);\n            print_entry(indentation, offset + entry_offset, &entry);\n        }\n\n        println!(\";; --- END OF TARGET BYTECODE ---\\n\");\n    }\n\n    assert_eq!(half_word_ix * 4, offset_to_data_section_in_bytes as usize);\n    assert_eq!(bytecode.len(), offset_to_data_section_in_bytes as usize);\n\n    let named_data_section_entries_offsets = data_section\n        .configurables\n        .iter()\n        .enumerate()\n        .map(|(id, entry)| {\n            let EntryName::Configurable(name) = &entry.name else {\n                panic!(\"non-configurable found in configurables region of the data section\");\n            };\n            (\n                name.clone(),\n                offset_to_data_section_in_bytes\n                    + data_section.data_id_to_offset(&DataId {\n                        idx: id as u32,\n                        region: DataSectionRegion::Configurables,\n                    }) as u64,\n            )\n        })\n        .collect::<BTreeMap<String, u64>>();\n\n    let mut data_section = data_section.serialize_to_bytes();\n    bytecode.append(&mut data_section);\n\n    CompiledBytecode {\n        bytecode,\n        named_data_section_entries_offsets,","sourceCodeStart":305,"sourceCodeEnd":341,"githubUrl":"https://github.com/FuelLabs/sway/blob/dad95cc42b0383b4e3bacdeda9766565aa584a92/sway-core/src/asm_generation/finalized_asm.rs#L305-L341","documentation":"This panic fires during bytecode finalization in to_bytecode while building the map of configurable names to their absolute offsets. Every entry in data_section.configurables must carry an EntryName::Configurable; if the let-else pattern fails, an entry whose name is a different variant (e.g. a blob or non-configurable datum) ended up in the configurables region, meaning the data section was constructed incorrectly upstream (entries placed in the wrong region).","triggerScenarios":"Thrown at sway-core/src/asm_generation/finalized_asm.rs:323 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix data section construction so only entries named EntryName::Configurable are pushed into the configurables region","Audit the code paths that build DataSection.configurables (e.g. configurables collection during codegen) and ensure region assignment matches the entry name variant","Add a debug assertion or validation when entries are inserted into the configurables region so the mismatch is caught earlier with a better diagnostic"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"dad95cc42b0383b4e3bacdeda9766565aa584a92","analyzedAt":"2026-09-04T20:02:14.068Z","contentChangedAt":"2026-09-04T20:02:14.068Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}