kakaopensource / KakaJSON

Fast conversion between JSON and model in Swift.
MIT License
1.16k stars 125 forks source link

AddressSanitizer 报错 #57

Open xiaoMing0109 opened 3 years ago

xiaoMing0109 commented 3 years ago

image

thread info -s
thread #1: tid = 0x56556c, 0x00000001067bd74c libclang_rt.asan_ios_dynamic.dylib`__asan::AsanDie(), queue = 'com.apple.main-thread', stop reason = Global buffer overflow

{
  "access_size": 44,
  "access_type": 0,
  "address": 4460594657,
  "description": "global-buffer-overflow",
  "instrumentation_class": "AddressSanitizer",
  "pc": 4403555236,
  "stop_type": "fatal_error"
}
var practiceCountDatas: [[String: Any]] = [["count": 3, "countText": "3题", "isSelected": false],
                                                   ["count": 5, "countText": "5题", "isSelected": false],
                                                   ["count": 10, "countText": "10题", "isSelected": false]]
        var models = modelArray(from: practiceCountDatas, XZPracticeCountModel.self)
private struct XZPracticeCountModel: Convertible {
    var count: Int = 0
    var countText: String?
    var isSelected: Bool = false
}
wolfcon commented 2 years ago

可能跟这个相关: https://github.com/wickwirew/Runtime/pull/88