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