10000 fix 142457 , fixes double free corruption by adding TORCH_CHECK to ensure weights have the proper size by AmalDevHaridevan · Pull Request #148620 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

fix 142457 , fixes double free corruption by adding TORCH_CHECK to ensure weights have the proper size #148620

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

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
updated comments
  • Loading branch information
AmalDevHaridevan committed Mar 5, 2025
commit b3b46b5d043954b3c119bf3f58059dcd4285bb38
3 changes: 1 addition & 2 deletions aten/src/ATen/native/NaiveConvolutionTranspose3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ static inline void slow_conv_transpose3d_shape_check(
if (weight.defined()) {
const int64_t n_input_plane = weight.size(0);
check_dim_size(input, ndim, dimf, n_input_plane);
// add check to ensure that weight has the dimensions we expect, i.e n_input_plane x n_output_plane x kernel_depth x kernel_height x kernel_width
// weight shall have 5 dims, which wree already checked, so we can safely call check_dim_size with 5 as dim
// add check to ensure that weight has the sizes we expect, i.e n_input_plane x n_output_plane x kernel_depth x kernel_height x kernel_width
// check_dim_size will throw a generic error, to be more informative, we will do TORCH_CHECK manually
TORCH_CHECK(
weight.size(2) == kernel_depth,
Expand Down
Loading
0