{"record":{"id":"0f73d60e1a0aadf3","repo":"Hmbown/CodeWhale","slug":"loaded-image-mapping-for-updater-marker-is-not-exe","errorCode":null,"errorMessage":"loaded-image mapping for updater marker is not executable","messagePattern":"loaded-image mapping for updater marker is not executable","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/cli/src/update.rs","lineNumber":353,"sourceCode":"\n        let permissions = fields\n            .next()\n            .context(\"loaded-image mapping is missing permissions\")?;\n        let _offset = fields\n            .next()\n            .context(\"loaded-image mapping is missing its file offset\")?;\n        let device = fields\n            .next()\n            .context(\"loaded-image mapping is missing its device\")?;\n        let inode = fields\n            .next()\n            .context(\"loaded-image mapping is missing its inode\")?\n            .parse::<u64>()\n            .context(\"loaded-image mapping has an invalid inode\")?;\n        let path = fields.collect::<Vec<_>>().join(\" \");\n\n        if permissions.as_bytes().get(2) != Some(&b'x') {\n            bail!(\"loaded-image mapping for updater marker is not executable\");\n        }\n        if inode == 0 {\n            bail!(\"loaded-image mapping for updater marker has no file inode\");\n        }\n        let (device_major, device_minor) = device\n            .split_once(':')\n            .context(\"loaded-image mapping has an invalid device\")?;\n        let device_major = u32::from_str_radix(device_major, 16)\n            .context(\"loaded-image mapping has an invalid device major number\")?;\n        let device_minor = u32::from_str_radix(device_minor, 16)\n            .context(\"loaded-image mapping has an invalid device minor number\")?;\n        if path.is_empty() {\n            bail!(\"loaded-image mapping for updater marker has no pathname\");\n        }\n\n        let mapping = AndroidImageMapping {\n            start,\n            end,","sourceCodeStart":335,"sourceCodeEnd":371,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/cli/src/update.rs#L335-L371","documentation":"Raised while parsing /proc/self/maps for the row whose address range contains the updater marker function: that row's permission field has no 'x' at position 2 (e.g. rw-p or r--p). The updater only trusts an executable, file-backed mapping as the image it may replace. Since the marker is a function, its address should sit in an r-xp segment; a non-executable row means the mapping layout is unexpected and the updater refuses to continue.","triggerScenarios":"Android self-update where parse_android_image_mapping finds the marker address inside a mapping flagged non-executable - e.g. the symbol address was resolved into a data/relro segment, or an unusual loader maps the image without exec permissions on that range.","commonSituations":"Hardened/patched loaders, unusual RELRO layouts, emulators, or corrupted maps state on specific ROMs; essentially always an environment anomaly rather than a config mistake.","solutions":["Restart the process and retry the update; transient maps state from partial page-in can clear","Reinstall the binary with the documented installer and retry the self-update","If it reproduces, attach the /proc/self/maps output and device/Android version to a bug report"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"Catch the update error and, when the message contains 'not executable' and '/proc/self/maps' context, surface a 'self-update unavailable in this environment; update manually' message rather than retrying in a loop.","preventionTips":["Run the CLI from a standard exec launch so its code segment is mapped r-xp","Avoid hardened/patched loaders for this binary","Report reproductions with /proc/self/maps attached"],"tags":["android","proc-maps","self-update","permissions"],"backgroundTag":"proc-maps-mapping-not-executable","analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","schemaVersion":2},"datasetVersion":"2026-08-22T04:17:13.399Z"}