>
> Oh, I forgot to add the part that you also need a CI that compiles and runs
> with ASan and UBSan.
>
That's certainly a good idea. Not aware of any UBSan running on MSVC, but
nothing wrong with running a parallel CI using clang and UBSan (except...work
:-)
Kind regards
Robert
_
On Tuesday 26 November 2024 00:25:45 Pacific Standard Time Schimkowitsch Robert
wrote:
> The problem with testing UB cases is that the program can do anything, which
> means a runtime unit test could succeed even though e.g. I hit a signed
> integer overflow. That's why I would consider compile-ti
>
> That should be done in unit testing, wherever possible. Some
> conditions we simply can't test, such as *succeeding* in allocating a
> memory block of a size comparable to PTRDIFF_MAX because such a block
> is not architecturally possible (on 64-bit machines). As a rule of
> thumb for test writ