rabbitmq / rabbitmq-objc-client

RabbitMQ client for Objective-C and Swift
https://rabbitmq.com
Other
241 stars 84 forks source link

XCode 9 Undefined Behavior Sanitizer errors #129

Closed AndrewMcDrew closed 5 years ago

AndrewMcDrew commented 6 years ago

Hi.

There is a little problem with Undefined Behavior Sanitizer introduced in XCode 9. When it is enabled trying to connect generates such a log:

/Users/aurban/SomeProject/Pods/RMQClient/RMQClient/RMQParser.m:164:34: runtime error: load of misaligned address 0x00010fe3bf01 for type 'UInt16' (aka 'unsigned short'), which requires 2 byte alignment
0x00010fe3bf01: note: pointer points here
 00 00 00  01 00 00 00 00 01 ed 00  0a 00 0a 00 09 00 00 01  c8 0c 63 61 70 61 62 69  6c 69 74 69 65
              ^ 

Nevertheless, seems to work fine.

michaelklishin commented 5 years ago

I'm afraid I cannot reproduce with XCode 10.1 and our test suite. I have enabled the sanitizer for the client itself.