diff options
author | Eli Amesefe <eliamesefe@fb.com> | 2019-04-02 10:07:22 -0700 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2019-04-02 10:10:11 -0700 |
commit | 385a755b68717150591ae88f33b4232bdb4076de (patch) | |
tree | 45bcde38410a9c98877203bda06a013d2a875d4e /tools/shared | |
parent | a799751e33809459584e476ade99a110f4b5500c (diff) | |
download | pytorch-385a755b68717150591ae88f33b4232bdb4076de.tar.gz pytorch-385a755b68717150591ae88f33b4232bdb4076de.tar.bz2 pytorch-385a755b68717150591ae88f33b4232bdb4076de.zip |
Undefined behavior with memset of std::string to 0 (#18703)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18703
`zeroPtr` is sometimes a `std::string` tensor, so `memset` to 0 is undefined behavior.
This might be accidentally safe with `std::string` implementation that use SSO (Small String Optimization), but will crash otherwise.
Reviewed By: zheng-xq
Differential Revision: D14714458
fbshipit-source-id: 012a18464e6514d38ff791509b88ddc3fc55b2b1
Diffstat (limited to 'tools/shared')
0 files changed, 0 insertions, 0 deletions