当我将其包含在我的iOS应用程序中时,我使用CMake与ssl支持交叉编译libwebsockets。它崩溃了。
以下是崩溃错误消息:
[1414827913:9557] NOTICE: Initial logging level 7
[1414827913:9557] NOTICE: Initial logging level 7
[1414827913:9557] NOTICE: Initial logging level 7
[1414827913:9557] NOTICE: Library version: 1.3 b47fc59
[1414827913:9557] NOTICE: Library version: 1.3 b47fc59
[1414827913:9558] NOTICE: Library version: 1.3 b47fc59
[1414827913:9558] NOTICE: IPV6 compiled in and enabled
[1414827913:9558] NOTICE: IPV6 compiled in and enabled
[1414827913:9558] NOTICE: IPV6 compiled in and enabled
[1414827913:9558] NOTICE: libev support not compiled in
[1414827913:9558] NOTICE: libev support not compiled in
[1414827913:9558] NOTICE: libev support not compiled in
[1414827913:9559] NOTICE: static allocation: 4520 + (16 x 256 fds) = 8616 bytes
[1414827913:9559] NOTICE: static allocation: 4520 + (16 x 256 fds) = 8616 bytes
[1414827913:9559] NOTICE: static allocation: 4520 + (16 x 256 fds) = 8616 bytes
[1414827913:9560] NOTICE: canonical_hostname = A03101308205.local
[1414827913:9560] NOTICE: canonical_hostname = A03101308205.local
[1414827913:9560] NOTICE: canonical_hostname = A03101308205.local
[1414827913:9560] NOTICE: per-conn mem: 208 + 1594 headers + protocol rx buf
[1414827913:9561] NOTICE: per-conn mem: 208 + 1594 headers + protocol rx buf
[1414827913:9562] NOTICE: per-conn mem: 208 + 1594 headers + protocol rx buf
cpp-tests iOS(84001,0x1194eb000) malloc: *** error for object 0x7fd491252320: double free
*** set a breakpoint in malloc_error_break to debug
cpp-tests iOS(84001,0x119468000) malloc: *** error for object 0x7fd491297c70: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
如果我删除了libwebcoskets的ssl支持,一切都很好。
我的操作系统是Yosemite 10.10,iOS SDK是8.1,xcode版本是6.1,libwebsockets版本是1.3