News for hackers. Stuff that matters.
Re:Undefined behavior in C is a reading error by gpderetta on Friday May 21, 2021 @04:53AM (#27231830)
It is a bit different.

Ubsan will abort an invalid program if it detect ub. It doesn't let you handle it. So you shouldn't remove the erroneous check, but fix it so it is no longer erroneous, and ubsan will help you identify these errors.

Also ubsan adds significant overhead so it is not really appropriate for production builds unfortunately (hence my wish for a less powerful ubsan-lite but with lower overhead).

There are no comments on this comment yet.