{"record":{"id":"ebcfeb6b04a6a4de","repo":"oven-sh/bun","slug":"outofmemory","errorCode":null,"errorMessage":"OutOfMemory","messagePattern":"OutOfMemory","errorType":"error_code","errorClass":"MachoError","httpStatus":null,"severity":"error","filePath":"src/exe_format/macho.rs","lineNumber":30,"sourceCode":"const SECTNAME: [u8; 16] = *b\"__bun\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\";\n\n#[derive(Debug, Copy, Clone, PartialEq, Eq, thiserror::Error, strum::IntoStaticStr)]\npub enum MachoError {\n    #[error(\"InvalidObject\")]\n    InvalidObject,\n    #[error(\"MissingLinkeditSegment\")]\n    MissingLinkeditSegment,\n    #[error(\"OffsetOutOfRange\")]\n    OffsetOutOfRange,\n    #[error(\"OffsetOverflow\")]\n    OffsetOverflow,\n    #[error(\"InvalidLinkeditOffset\")]\n    InvalidLinkeditOffset,\n    #[error(\"OverlappingSegments\")]\n    OverlappingSegments,\n    #[error(\"MissingRequiredSegment\")]\n    MissingRequiredSegment,\n    #[error(\"OutOfMemory\")]\n    OutOfMemory,\n}\nbun_core::oom_from_alloc!(MachoError);\n\npub struct MachoFile {\n    pub(crate) header: macho::mach_header_64,\n    pub(crate) data: Vec<u8>,\n    pub(crate) segment: macho::segment_command_64,\n    pub(crate) section: macho::section_64,\n}\n\n/// Expands to one `shift_one` call per named field.\nmacro_rules! shift_fields {\n    ($shifter:expr, $value:expr, $($field:ident),+ $(,)?) => {{\n        $( $shifter.shift_one(&mut $value.$field)?; )+\n    }};\n}\n","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/src/exe_format/macho.rs#L12-L48","documentation":"Error \"OutOfMemory\" thrown in oven-sh/bun.","triggerScenarios":"Thrown at src/exe_format/macho.rs:30 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":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}