cezheng / Fuzi

A fast & lightweight XML & HTML parser in Swift with XPath & CSS support
MIT License
1.08k stars 161 forks source link

Fix for Xcode16: safe way to create UnsafeBufferPointer #131

Open MelDev1 opened 3 weeks ago

mickael-menu commented 3 weeks ago

@cezheng Any chance of getting this reviewed and merged? Since Xcode 16 Fuzi has been crashing in production builds with these kinds of stacktrace:

Crashed: com.apple.root.default-qos
0 libsystem_platform.dylib 0x2a54 platform_memmove + 52
1 libxml2.2.dylib 0x18638 + 216
2 libxml2.2.dylib 0x6a58 xmlParserInputBufferCreateMem + 92
3 libxml2.2.dylib 0x67d4 xmlCreateMemoryParserCtxt + 72
4 libxml2.2.dylib 0x6610 xmlReadMemory + 60
5 0x101c55c XMLDocument.__allocating_init(string:encoding:) + 130 (Document.swift:130)
6 0x1171cb4 FuziXMLDocument.init(string:namespaces:) + 14 (Fuzi.swift:14)

Thanks!