You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Xcode 14升级后网络请求解析数据时DataCompression崩溃求助

Xcode 14升级后Gzip解析崩溃问题

升级到Xcode 14后,每次执行网络请求并解析数据时都会触发崩溃,异常出现在DataCompression扩展里Data的gunzip()方法的解析代码段。使用Xcode 13.4时该功能运行完全正常。

相关代码

let ftr: GZipFooter = withUnsafeBytes { (bptr: UnsafePointer<UInt8>) -> GZipFooter in
    // +---+---+---+---+---+---+---+---+
    // |     CRC32     |     ISIZE     |
    // +---+---+---+---+---+---+---+---+
    return bptr.advanced(by: count - 8).withMemoryRebound(to: UInt32.self, capacity: 2) { ptr in
        return (ptr[0].littleEndian, ptr[1].littleEndian)
    }
}

崩溃截图

崩溃截图1
崩溃截图2

内容的提问来源于stack exchange,提问作者Jersey

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.18 22:40:34