-
Notifications
You must be signed in to change notification settings - Fork 608
Fix stack buffer overflow when XNNPACK tensor has too many dims #3233
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/3233
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 5c94e49 with merge base 3b0f271 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D56450593 |
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.
Looks good to me! Maybe I'll let @mcr229 and @digantdesai for more detailed review...
@@ -38,9 +38,11 @@ def define_common_targets(): | |||
preprocessor_flags = [ | |||
# "-DENABLE_XNNPACK_PROFILING", | |||
], | |||
exported_deps = [ | |||
"//executorch/runtime/backend:interface", |
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.
Any specific reason we make it an exported_deps
?
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.
there's an include in a header (I think XNNExecutor.h), so dependent libraries that include that header need this dep. This is what exported_deps is for.
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
#include <executorch/backends/xnnpack/runtime/XNNExecutor.h> |
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.
oh is it for the test....
c9ce128
to
c9bf908
Compare
…rch#3233) Summary: Noticed this overflow when I was looking through the XNNPACK backend. I am not very familiar with executorch or XNNPACK, so please be critical in review! In particular, my test is crashing in xnn_delete_runtime and I don't know why; it was previously getting a UBSAN failure for the stack buffer overflow before I patched XNNExecutor.cpp Differential Revision: D56450593
This pull request was exported from Phabricator. Differential Revision: D56450593 |
…rch#3233) Summary: Noticed this overflow when I was looking through the XNNPACK backend. I am not very familiar with executorch or XNNPACK, so please be critical in review! In particular, my test is crashing in xnn_delete_runtime and I don't know why; it was previously getting a UBSAN failure for the stack buffer overflow before I patched XNNExecutor.cpp Differential Revision: D56450593
c9bf908
to
bbcab0a
Compare
This pull request was exported from Phabricator. Differential Revision: D56450593 |
…rch#3233) Summary: Noticed this overflow when I was looking through the XNNPACK backend. I am not very familiar with executorch or XNNPACK, so please be critical in review! In particular, my test is crashing in xnn_delete_runtime and I don't know why; it was previously getting a UBSAN failure for the stack buffer overflow before I patched XNNExecutor.cpp Differential Revision: D56450593
bbcab0a
to
9c7a733
Compare
This pull request was exported from Phabricator. Differential Revision: D56450593 |
…rch#3233) Summary: Noticed this overflow when I was looking through the XNNPACK backend. I am not very familiar with executorch or XNNPACK, so please be critical in review! In particular, my test is crashing in xnn_delete_runtime and I don't know why; it was previously getting a UBSAN failure for the stack buffer overflow before I patched XNNExecutor.cpp Differential Revision: D56450593
9c7a733
to
5c94e49
Compare
This pull request was exported from Phabricator. Differential Revision: D56450593 |
This pull request has been merged in dc726f9. |
Summary:
Noticed this overflow when I was looking through the XNNPACK backend.
I am not very familiar with executorch or XNNPACK, so please be critical in review! In particular, my test is crashing in xnn_delete_runtime and I don't know why; it was previously getting a UBSAN failure for the stack buffer overflow before I patched XNNExecutor.cpp
Differential Revision: D56450593