{"record":{"id":"409c249aecadcf1f","repo":"swc-project/swc","slug":"failed-to-convert-pointer-size-to-calculate-msg","errorCode":null,"errorMessage":"Failed to convert pointer size to calculate: {msg}","messagePattern":"Failed to convert pointer size to calculate: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/swc_plugin_runner/src/transform_executor.rs","lineNumber":91,"sourceCode":"        self.instance.cleanup()?;\n\n        // Construct serialized struct from raw bytes.\n        // Since we have finished transformation, it's safe to fetch the data from\n        // Arc<Mutex<T>>\n        drop(self.instance);\n        let transformed_result = Arc::try_unwrap(self.transform_result)\n            .map_err(|_| {\n                anyhow!(\"Failed to unwrap Arc: other references to transform_result exist\")\n            })?\n            .into_inner();\n        let ret = PluginSerializedBytes::from_bytes(transformed_result);\n\n        let ret = if returned_ptr_result == 0 {\n            Ok(ret)\n        } else {\n            let err: PluginError = ret.deserialize()?.into_inner();\n            match err {\n                PluginError::SizeInteropFailure(msg) => Err(anyhow!(\n                    \"Failed to convert pointer size to calculate: {msg}\"\n                )),\n                PluginError::Deserialize(msg) | PluginError::Serialize(msg) => {\n                    Err(anyhow!(\"{msg}\"))\n                }\n                _ => Err(anyhow!(\n                    \"Unexpected error occurred while running plugin transform\"\n                )),\n            }\n        };\n\n        ret\n    }\n\n    /**\n     * Check compile-time version of AST schema between the plugin and\n     * the host. Returns true if it's compatible, false otherwise.\n     *","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_plugin_runner/src/transform_executor.rs#L73-L109","documentation":"The guest plugin returned PluginError::SizeInteropFailure: the buffer size it reported across the wasmtime ABI could not be converted to the host's pointer-size type, so the runner wraps the plugin's message and fails the transform. This indicates a plugin/host ABI or pointer-width mismatch.","triggerScenarios":"Thrown at crates/swc_plugin_runner/src/transform_executor.rs:91 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rebuild the plugin against a compatible swc_plugin/wasm ABI version","Verify plugin and host agree on pointer width (32 vs 64-bit wasm)","Remove or replace the misbehaving plugin"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5176682b65416c6b5de6b47379ae1588ea3ecb3f","analyzedAt":"2026-08-17T16:16:52.067Z","contentChangedAt":"2026-08-17T16:16:52.067Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}