3 ms·
Yeah, I do understand the main principle behind it, and I think an address sanitizer helps here - I did some tests and the ASAN coming with Clang 14.0.0 catches
by mk89 4y ago
Yeah, I do understand the main principle behind it, and I think an address sanitizer helps here - I did some tests and the ASAN coming with Clang 14.0.0 catches the bug (at runtime, of course).
It's a different approach, and definitely less efficient than compile-time checking, but if your program is not too complex I think it's OK. Especially if you use such sanitizers at the unit test level.
I don't have enough experience to say if it actually works in general though, because as usual everything on paper is always working.