Crash triggered by handling division by isinf operator

Recently I have found a bug that TVM would be crashed when I used the divide operator that was divided by isinf operator, resulting division by unsigned int32 value 0 in the select operator, which was used in the for statement. The TVM version is TVM 0.10 dev0 ,the git commit is f6543e9e6173cd45b678e91b5a637ff7f8e0e02. I’d be appreciated if anyone can help me. :grinning:

import tvm
from tvm import tir
case1=tir.Var('case1','int32')
c1=tir.const(1519191205,'uint32')
a=tir.call_intrin('float32','tir.isinf',tir.const(15.0,'float32'))
inf1=tir.Cast('uint32',a)
s1=tir.Select(tir.EQ(tir.FloorDiv(tir.const(1,'uint32'),inf1),c1),0,1)
for1=tir.For(case1,0,32,1,tir.Evaluate(s1))
f=tir.PrimFunc({},for1)
mod3=tvm.build(f)

I tested another function isfinite, the finite function returned True then TVM casted the returned value and the FloorDiv is divided by unsigned int32 value 1. So this problem perhaps was not caused by division by zero. The const_int_bound.cc returned error messages :

It seems that the size is inconsistent. I’m curious about the meaning of additional_info_.size(). The The functions isinf and isfinite are called by calling the other functions. Is secure that we call them in the call_intrin function? In some cases it threw the error messages: Attribute TCallEffectKind has not been registered for tir.isinf. Why doesn’t TVM register TCallEffectKind for the isinf and isfinite functions?

import tvm
from tvm import tir
a=tir.call_intrin('float32','tir.isinf',tir.const(15.0,'float32'))
inf1=tir.Cast('uint32',a)
f=tir.PrimFunc({},tir.Evaluate(inf1))
tvm.build(f)