Skip to content

Commit 94439d7

Browse files
houseroadfacebook-github-bot
authored andcommitted
Suppress the vptr warning in ubsan (pytorch#9909)
Summary: Unblock pytorch#8469 Pull Request resolved: pytorch#9909 Differential Revision: D9023650 Pulled By: houseroad fbshipit-source-id: 7682a9cd7905e98c802b820ad59745672b32970d
1 parent c0bacc6 commit 94439d7

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.jenkins/pytorch/test.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,17 @@ popd
2121
# ASAN test is not working
2222
if [[ "$BUILD_ENVIRONMENT" == *asan* ]]; then
2323
export ASAN_OPTIONS=detect_leaks=0:symbolize=1
24-
export UBSAN_OPTIONS=print_stacktrace=1
24+
# We suppress the vptr volation, since we have separate copies of
25+
# libprotobuf in both libtorch.so and libcaffe2.so, and it causes
26+
# the following problem:
27+
# test_cse (__main__.TestJit) ... torch/csrc/jit/export.cpp:622:38:
28+
# runtime error: member call on address ... which does not point
29+
# to an object of type 'google::protobuf::MessageLite'
30+
# ...: note: object is of type 'onnx_torch::ModelProto'
31+
#
32+
# This problem should be solved when libtorch.so and libcaffe2.so are
33+
# merged.
34+
export UBSAN_OPTIONS=print_stacktrace=1:suppressions=$PWD/ubsan.supp
2535
export PYTORCH_TEST_WITH_ASAN=1
2636
export PYTORCH_TEST_WITH_UBSAN=1
2737
# TODO: Figure out how to avoid hard-coding these paths

ubsan.supp

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vptr:libtorch.so

0 commit comments

Comments
 (0)