I have been using the address sanitizer in Xcode for a couple of weeks to debug a few problems, and finally decide to turn it off again. But after I unchecked it and tried to build it gives me these four errors:
error build: Undefined symbol: ___ubsan_handle_add_overflow
error build: Undefined symbol: ___ubsan_handle_nonnull_arg
error build: Undefined symbol: ___ubsan_handle_pointer_overflow
error build: Undefined symbol: ___ubsan_handle_type_mismatch_v1
If I go ahead and enable the address sanitizer again it builds.
Any idea how to solve this, or what cause it?
I have tried to clean the build folder and delete derived data, but I get the same errors.
CodePudding user response:
I managed to solve it. As you can see on the image in my question, the "Undefined Behavior Sanitizer" was still turned on, but greyed out, so I tried disabling it by editing the .xcscheme
file directly.
To do so, right click your .xcodeproj
file and select "Show package content" and inside the xcshareddata/xcschemes
folder you will find the .xcscheme
file. Open it in a code editor and edit: enableUBSanitizer = "YES"
to enableUBSanitizer = "NO"
Save and you are good to go!