Xcode 9: Undefined Behavior Sanitizer
·1 min
Xcode 9 adds the Undefined Behavior Sanitizer. Undefined Behavior Sanitizer detects undefined behavior in your code, specializing in checking unsafe constructs in C, C++, and Objective-C code.
Undefined Behavior Sanitizer is turned off initially. You must enable it in your scheme. Select the Run step in the scheme and click the Diagnostics button at the top of the scheme editor. Select the Undefined Behavior Sanitizer checkbox.
After selecting the Undefined Behavior Sanitizer checkbox, build and run your project to run it through Undefined Behavior Sanitizer. You can learn more about Undefined Behavior Sanitizer in the following WWDC video: