Skip to content
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

AnyValueTest.CorrectlyAccessesIntWhenCorrectType UBSAN failure: owncast of address 0x60300105d750 which does not point to an object of type 'Holder<const int>' Sep 27 00:01:03 0x60300105d750: note: object is of type 'torch::nn::AnyModule::Value::Holder<int>' #26964

Open
ezyang opened this issue Sep 27, 2019 · 0 comments
Labels
module: build Build system issues module: cpp Related to C++ API triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@ezyang
Copy link
Contributor

ezyang commented Sep 27, 2019

In #26927 I turn on libtorch tests in our ASAN build. I subsequently get this UBSAN error

Sep 27 00:01:02 [ RUN      ] AnyValueTest.CorrectlyAccessesIntWhenCorrectType
Sep 27 00:01:03 /var/lib/jenkins/workspace/caffe2/../torch/csrc/api/include/torch/nn/modules/container/any.h:258:15: runtime error: downcast of address 0x60300105d750 which does not point to an object of type 'Holder<const int>'
Sep 27 00:01:03 0x60300105d750: note: object is of type 'torch::nn::AnyModule::Value::Holder<int>'
Sep 27 00:01:03  5a 02 00 43  e8 7c fd dd 92 55 00 00  e0 7c d7 e0 7a 7f 00 00  05 00 00 00 be be be be  00 00 00 00
Sep 27 00:01:03               ^~~~~~~~~~~~~~~~~~~~~~~
Sep 27 00:01:03               vptr for 'torch::nn::AnyModule::Value::Holder<int>'
Sep 27 00:01:03     #0 0x5592dd02fa81 in int const* torch::nn::AnyModule::Value::try_get<int const>() (/var/lib/jenkins/workspace/build/bin/test_api+0x8f6a81)
Sep 27 00:01:03     #1 0x5592dd003b28 in AnyValueTest_CorrectlyAccessesIntWhenCorrectType_Test::TestBody() (/var/lib/jenkins/workspace/build/bin/test_api+0x8cab28)
Sep 27 00:01:03     #2 0x5592dd81c51a in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (/var/lib/jenkins/workspace/build/bin/test_api+0x10e351a)
Sep 27 00:01:03     #3 0x5592dd7cb00a in testing::Test::Run() (/var/lib/jenkins/workspace/build/bin/test_api+0x109200a)
Sep 27 00:01:03     #4 0x5592dd7cd952 in testing::TestInfo::Run() (/var/lib/jenkins/workspace/build/bin/test_api+0x1094952)
Sep 27 00:01:03     #5 0x5592dd7cf87a in testing::TestCase::Run() (/var/lib/jenkins/workspace/build/bin/test_api+0x109687a)
Sep 27 00:01:03     #6 0x5592dd7f1c84 in testing::internal::UnitTestImpl::RunAllTests() (/var/lib/jenkins/workspace/build/bin/test_api+0x10b8c84)
Sep 27 00:01:03     #7 0x5592dd821c51 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (/var/lib/jenkins/workspace/build/bin/test_api+0x10e8c51)
Sep 27 00:01:03     #8 0x5592dd7f0729 in testing::UnitTest::Run() (/var/lib/jenkins/workspace/build/bin/test_api+0x10b7729)
Sep 27 00:01:03     #9 0x5592dcf19527 in main (/var/lib/jenkins/workspace/build/bin/test_api+0x7e0527)
Sep 27 00:01:03     #10 0x7f7aae41c82f in __libc_start_main /build/glibc-LK5gWL/glibc-2.23/csu/../csu/libc-start.c:291
Sep 27 00:01:03     #11 0x5592dcf18ed8 in _start (/var/lib/jenkins/workspace/build/bin/test_api+0x7dfed8)
Sep 27 00:01:03 
Sep 27 00:01:03 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /var/lib/jenkins/workspace/caffe2/../torch/csrc/api/include/torch/nn/modules/container/any.h:258:15 in 

Looks like a const problem?

cc @yf225

@pbelevich pbelevich added module: build Build system issues module: cpp Related to C++ API triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: build Build system issues module: cpp Related to C++ API triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

2 participants