Skip to content
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

Missing return in error check in mlir::TFTPU #67551

Open
apach301 opened this issue May 14, 2024 · 0 comments · May be fixed by #67552
Open

Missing return in error check in mlir::TFTPU #67551

apach301 opened this issue May 14, 2024 · 0 comments · May be fixed by #67552
Assignees
Labels
awaiting review Pull request awaiting review TF 2.16 type:bug Bug

Comments

@apach301
Copy link
Contributor

Issue type

Bug

Have you reproduced the bug with TensorFlow Nightly?

No

Source

source

TensorFlow version

2.16.1

Custom code

No

OS platform and distribution

No response

Mobile device

No response

Python version

No response

Bazel version

No response

GCC/compiler version

No response

CUDA/cuDNN version

No response

GPU model and memory

No response

Current behavior?

Possible null pointer dereference may occur because of missing return in error check:

auto launch_op = llvm::dyn_cast<tf_device::LaunchOp>(op->getParentOp());
if (!launch_op) {
op->emitError() << "TPUCopyWithDynamicShapeOp is not in a launch";
}
std::string device_str = launch_op.getDeviceAttr().getValue().str();

Standalone code to reproduce the issue

Bug was found with Svace static analyzer

Relevant log output

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review Pull request awaiting review TF 2.16 type:bug Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants