[onnx] Do not deref nullptr in scalar type analysis#50237
[onnx] Do not deref nullptr in scalar type analysis#50237malfet wants to merge 1 commit intopytorch:masterfrom
Conversation
💊 CI failures summary and remediationsAs of commit 5e29382 (more details on the Dr. CI page):
This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. This comment has been revised 32 times. |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
BowenBao
left a comment
There was a problem hiding this comment.
Thanks for working on a fix for this! I think this PR includes similar fix https://github.com/pytorch/pytorch/pull/50163/files#diff-26fb8ea5176375fe4e4a7522807968d4ef715717a890d1c4860686f2080ab1f2
Apply a little bit of defensive programming: `type->cast<TensorType>()` returns an optional pointer so dereferencing it can lead to a hard crash. Fixes SIGSEGV reported in pytorch#49959
e3ef8c0 to
5e29382
Compare
facebook-github-bot
left a comment
There was a problem hiding this comment.
@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Codecov Report
@@ Coverage Diff @@
## master #50237 +/- ##
=======================================
Coverage 80.68% 80.68%
=======================================
Files 1902 1902
Lines 206348 206354 +6
=======================================
+ Hits 166485 166491 +6
Misses 39863 39863 |
You probably know, but you can also use |
|
@t-vi the design paradigm in that codepath looked like nullptr should be silently skipped rather than raising exception on it. |
Summary: Apply a little bit of defensive programming: `type->cast<TensorType>()` returns an optional pointer so dereferencing it can lead to a hard crash. Fixes SIGSEGV reported in pytorch#49959 Pull Request resolved: pytorch#50237 Reviewed By: walterddr Differential Revision: D25839675 Pulled By: malfet fbshipit-source-id: 403d6df5e2392dd6adc308b1de48057f2f9d77ab
Apply a little bit of defensive programming:
type->cast<TensorType>()returns an optional pointer so dereferencing it can lead to a hard crash.Fixes SIGSEGV reported in #49959