Add UBSAN to ASAN (#88055)

Add undefined behavior sanitizer to `USE_ASAN` option.
Added `torch._C._crash_if_vptr_ubsan()` that only fails if vptr belongs to a wrong class after typecast
Deleted all ubsan supressions, but disabled `ProtoTest::Basic` as it fails above-mentioned vptr check.

Fixes https://github.com/pytorch/pytorch/issues/88042
Pull Request resolved: https://github.com/pytorch/pytorch/pull/88055
Approved by: https://github.com/ezyang
This commit is contained in:
Nikita Shulga
2022-11-01 17:59:35 +00:00
committed by PyTorch MergeBot
parent 81f74eed75
commit e1c123d29a
5 changed files with 36 additions and 8 deletions

View File

@ -1,2 +0,0 @@
vptr:libtorch_python.so
vptr:test_jit