Xcode 9: Undefined Behavior Sanitizer

October 5th, 2017

Filed under: Xcode | Be the first to comment!

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.

Xcode9UndefinedBehaviorSanitizer

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:

Finding Bugs Using Xcode Runtime Tools

Facebooktwittergoogle_plusredditmail

Tags:


Leave a Reply

Your email address will not be published. Required fields are marked *