pytorch
878719a2 - initialise the members boolean_ and integer_ of at::indexing::TensorIndex (#91399)

Commit
1 year ago
initialise the members boolean_ and integer_ of at::indexing::TensorIndex (#91399) initialise the members boolean_ and integer_ of at::indexing::TensorIndex to false and 0 respectively, because the compiler generated copy-ctor accesses them which is UB. This resolves a compile time warning, a runtime error from UBSan + gcc, and a runtime error from MSVC when compiling debug. Fixes #90951 Pull Request resolved: https://github.com/pytorch/pytorch/pull/91399 Approved by: https://github.com/bdhirsh
Author
Lukas N Wirz
Committer
Parents
Loading