You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// src/Dialect/ONNX/ONNXOps/Tensor/Reshape.cpp:26
template <>
LogicalResult ONNXReshapeOpShapeHelper::computeShape() {
ONNXReshapeOpAdaptor operandAdaptor(operands);
DimsExpr outputDims;
// Get info about input data operand.
Value data = operandAdaptor.getData();
int64_t dataRank = data.getType().cast<ShapedType>().getShape().size();
// Get info about shape operand.
Value shape = operandAdaptor.getShape();
int64_t outputRank = createIE->getShape(shape, 0);
assert(outputRank != -1 && "Shape tensor must have constant shape");
// !!!! Here outputRank is outputRank = 0x8000000000000000, i.e. -9223372036854775808
// Initialize context and results.
outputDims.resize(outputRank); // <--- !!!! This crashes
...
}
The attached input file crashes
onnx-mlir-opt --convert-onnx-to-stablehlo
(but not `--convert-onnx-to-tosa).The problem happens in
Neither ASan nor valgrind complains.
Commit 4400cbc.
Full transcript attached.
bad_onnx.txt
The text was updated successfully, but these errors were encountered: