New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[onnx] Do not deref nullptr in scalar type analysis #50237
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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