-
Notifications
You must be signed in to change notification settings - Fork 24.3k
[Ready for Review] Turn on UBSAN in the OSS build #8813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Still seems to be getting stuck in tp
|
Maybe writing a special list file will work? https://clang.llvm.org/docs/SanitizerSpecialCaseList.html |
.jenkins/pytorch/test.sh
Outdated
@@ -29,8 +29,9 @@ if [[ "$BUILD_ENVIRONMENT" == *asan* ]]; then | |||
ulimit -s 81920 | |||
|
|||
(cd test && python -c "import torch") | |||
echo "The next two invocations are expected to crash; if they don't that means ASAN is misconfigured" | |||
echo "The next two invocations are expected to crash; if they don't that means ASAN/UBSAN is misconfigured" |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Still got stuck in third part
|
Maybe you need a recursive specifier? It could be that |
We have tests that do this on purpose to check for "bad" return values (nan etc.). |
test/test_autograd.py
Outdated
@@ -14,7 +14,7 @@ | |||
from torch.autograd.function import once_differentiable | |||
from torch.autograd.profiler import profile | |||
from common import TEST_MKL, TestCase, run_tests, skipIfNoLapack, \ | |||
suppress_warnings, skipIfNoZeroSize | |||
suppress_warnings, skipIfNoZeroSize, TEST_WITH_ASAN |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@pytorchbot retest this please |
Woohoo! |
.jenkins/pytorch/test.sh
Outdated
(cd test && ! python -c "import torch; torch._C._crash_if_csrc_asan(3)") | ||
(cd test && ! python -c "import torch; torch._C._crash_if_aten_asan(3)") | ||
echo "The next three invocations are expected to crash; if they don't that means ASAN/UBSAN is misconfigured" | ||
# DEBUG: temporarily disable ASAN/UBSAN checks |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
torch/csrc/Module.cpp
Outdated
@@ -126,8 +127,15 @@ static PyObject * THPModule_crashIfCsrcASAN(PyObject *module, PyObject *arg) { | |||
return PyLong_FromLong(x[0]); | |||
} | |||
|
|||
static PyObject * THPModule_crashIfCsrcUBSAN(PyObject *module, PyObject *arg) { | |||
#ifndef _WIN32 | |||
__builtin_unreachable(); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to turn the smoketests back on.
68400a3
to
3d0220e
Compare
@@ -12,6 +12,12 @@ | |||
#define __at_align32__ | |||
#endif | |||
|
|||
#if defined(__clang__) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yf225 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@pytorchbot retest this please |
Summary: Copy of pytorch/pytorch#8802 Closes pytorch/pytorch#8813 Differential Revision: D8707364 Pulled By: yf225 fbshipit-source-id: bc201980b50e9fb44c42a17f898b50d3558fc417
Summary: Copy of pytorch/pytorch#8802 Closes pytorch/pytorch#8813 Differential Revision: D8707364 Pulled By: yf225 fbshipit-source-id: bc201980b50e9fb44c42a17f898b50d3558fc417
Summary: Copy of pytorch#8802 Closes pytorch#8813 Differential Revision: D8707364 Pulled By: yf225 fbshipit-source-id: bc201980b50e9fb44c42a17f898b50d3558fc417
Copy of #8802