onnx-mlir icon indicating copy to clipboard operation
onnx-mlir copied to clipboard

Fix crash in ReshapeOp inference when an input to the previous concat is not a valid dimension

Open jorickert opened this issue 1 year ago • 1 comments

The problem was that the check:

if ((getShape(vType)[0] == 1) && getElementType(vType).isSignlessInteger(64))
    return true;

can succeed even if areDims(Value val) is not true for all operands of Concat.

This causes a crash in getDims, which recursively calls getDims on all operands of Concats, without checking if these operands are dims.

jorickert avatar Jul 04 '24 09:07 jorickert

Can one of the admins verify this patch?

jenkins-droid avatar Jul 04 '24 09:07 jenkins-droid

@jenkins-droid test this please

tungld avatar Jul 05 '24 00:07 tungld

@jorickert could you update this PR with the latest main branch so that we can merge it? Somehow I cannot do it.

tungld avatar Jul 05 '24 12:07 tungld

@jorickert could you update this PR with the latest main branch so that we can merge it? Somehow I cannot do it.

I will on Monday

jorickert avatar Jul 05 '24 12:07 jorickert

Can one of the admins verify this patch?

jenkins-droid avatar Jul 08 '24 07:07 jenkins-droid

@jenkins-droid test this please

tungld avatar Jul 08 '24 07:07 tungld

@jorickert do you want this PR to be merged? Let us know and we will merge it.

AlexandreEichenberger avatar Jul 08 '24 14:07 AlexandreEichenberger

@AlexandreEichenberger Yes, please merge

jorickert avatar Jul 08 '24 15:07 jorickert

@jorickert Thanks for your contributions, much appreciated.

AlexandreEichenberger avatar Jul 08 '24 18:07 AlexandreEichenberger

Jenkins Linux amd64 Build #15078 [push] Fix crash in ReshapeOp i... started at 13:58

jenkins-droid avatar Jul 08 '24 18:07 jenkins-droid

Jenkins Linux s390x Build #15083 [push] Fix crash in ReshapeOp i... started at 14:58

jenkins-droid avatar Jul 08 '24 18:07 jenkins-droid

Jenkins Linux ppc64le Build #14108 [push] Fix crash in ReshapeOp i... started at 15:09

jenkins-droid avatar Jul 08 '24 18:07 jenkins-droid

Jenkins Linux amd64 Build #15078 [push] Fix crash in ReshapeOp i... passed after 1 hr 7 min

jenkins-droid avatar Jul 08 '24 20:07 jenkins-droid

Jenkins Linux s390x Build #15083 [push] Fix crash in ReshapeOp i... passed after 1 hr 25 min

jenkins-droid avatar Jul 08 '24 20:07 jenkins-droid

Jenkins Linux ppc64le Build #14108 [push] Fix crash in ReshapeOp i... passed after 1 hr 58 min

jenkins-droid avatar Jul 08 '24 20:07 jenkins-droid