summaryrefslogtreecommitdiff
path: root/torch/csrc/PtrWrapper.cpp
diff options
context:
space:
mode:
authorWill Feng <willfeng@fb.com>2018-07-16 19:18:33 -0700
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2018-07-16 19:25:22 -0700
commitad74006ffa22c79285e21c7777e9d386607ebbea (patch)
treeab2d932bc9515aaa1f70b63bda0f5005e52f578e /torch/csrc/PtrWrapper.cpp
parentc4bff252821743cf64c30336d5ce6ce0457e2a34 (diff)
downloadpytorch-ad74006ffa22c79285e21c7777e9d386607ebbea.tar.gz
pytorch-ad74006ffa22c79285e21c7777e9d386607ebbea.tar.bz2
pytorch-ad74006ffa22c79285e21c7777e9d386607ebbea.zip
Pass THDRequest as void* pointer to THDRequest_free (#9398)
Summary: This fixes https://github.com/pytorch/pytorch/issues/9054. Pull Request resolved: https://github.com/pytorch/pytorch/pull/9398 Reviewed By: ezyang Differential Revision: D8827778 Pulled By: yf225 fbshipit-source-id: 862287802cb69c6ac71ff4df19cadb89b1face1d
Diffstat (limited to 'torch/csrc/PtrWrapper.cpp')
-rw-r--r--torch/csrc/PtrWrapper.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/torch/csrc/PtrWrapper.cpp b/torch/csrc/PtrWrapper.cpp
index 544895bfd0..52d7b1f140 100644
--- a/torch/csrc/PtrWrapper.cpp
+++ b/torch/csrc/PtrWrapper.cpp
@@ -45,8 +45,7 @@ static PyObject * THPWrapper_pynew(PyTypeObject *type, PyObject *args, PyObject
return self;
}
-// UBSAN error: https://github.com/pytorch/pytorch/issues/9054
-static void THPWrapper_dealloc(THPWrapper* self) __ubsan_ignore_function__
+static void THPWrapper_dealloc(THPWrapper* self)
{
self->destructor(self->data);
Py_TYPE(self)->tp_free((PyObject*)self);