UBsan causes our test crash to abort instead. Switch the test to explicitly abort when sanitizers are in use.
mentioned in commit 2df1efcc