NUbots / NUWebots

Environment, models, and communication for using the Webots simulation with NUbots
MIT License
7 stars 4 forks source link

Adds ASan and UBSan as build options #36

Closed KipHamiltons closed 3 years ago

KipHamiltons commented 3 years ago

Address sanitizer and undefined behaviour sanitizer can be useful in finding and debugging buggy code. This PR adds options to the cmake configuration to enable them. I have tested these by using ldd on nugus_controller, and ldd reports that nugus_controller is linked to the sanitizers if they are enabled.

KipHamiltons commented 3 years ago

I can't see anything online suggesting that they don't. I just tested building with them both on and it compiled fine. I ran the controller with webots and it didn't crash or anything, so I suppose so?