Skip to content

Commit 472ee67

Browse files
yibo.niuyibo.niu
yibo.niu
authored and
yibo.niu
committed
fix dangling arrayref by extending temporary object lifetime
1 parent f42c7e4 commit 472ee67

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

externals/llvm-project

Submodule llvm-project deleted from 813f7c3

externals/stablehlo

Submodule stablehlo deleted from 6e403b1

lib/Conversion/TorchToTosa/TorchToTosa.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4025,7 +4025,7 @@ LogicalResult ConvertAtenOp<AtenIndexSelectOp>::matchAndRewrite(
40254025
return rewriter.notifyMatchFailure(
40264026
op, "Only RankedTensorType indices are currently supported");
40274027

4028-
auto inputShape = inputType.getShape();
4028+
auto inputShape = SmallVector<int64_t>(inputType.getShape());
40294029
int inputRank = inputType.getRank();
40304030

40314031
if (indexType.getRank() == 0) {

0 commit comments

Comments
 (0)