Commit 0aa75e6
Fix EValue construction from a smart pointer. (#5357)
Summary:
Pull Request resolved: #5357
The move constructor invoked by `*this =` expression tries to `destroy()` the `this` first, but it's not yet initialized.
For example, if the tag is randomly `Tag::ListTensor`, `destroy()` will try to iterate over and destroy a list of tensors. But since the memory is uninitialized, it will typically crash or corrupt memory.
Reviewed By: dbort
Differential Revision: D62658327
fbshipit-source-id: a12cb48f4bc3384a80534a453909e010c95498501 parent 69d33a8 commit 0aa75e6
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
252 | 254 | | |
253 | 255 | | |
254 | 256 | | |
| |||
0 commit comments