I don't know if it's guaranteed to bark on all possible cases of UB, but there we go:
$ cat test.c
int main() {
return *(int*)0;
}
$ gcc test.c -fsanitize=undefined -o test
$ ./test
test.c:2:9: runtime error: load of null pointer of type 'int'
Segmentation fault
I'm pretty sure I've seen similar tool based on clang as well.
And there is valgrind.