GPUOpen-Drivers / llvm-dialects

LLVM Dialects Library
Apache License 2.0
22 stars 22 forks source link

Fix argument count check for ops with only a variadic argument list. #93

Closed tsymalla closed 5 months ago

tsymalla commented 5 months ago

We don't count variadic arguments in the getNumFullArguments() method since they can be zero. Not properly checking the return value of this function can however lead to a arg_size() < 0 check in the generated verifier method. This happens if we only have a single variadic argument list argument.

This could also be solved with a call to std::max but just let us not emit verifier code instead.

tsymalla-AMD commented 5 months ago

Note that the GH Actions job sporadically fails here now as well: 7.982 OSError: [Errno 26] Text file busy: '/vulkandriver/builds/ci-build/compiler/llpc/llvm/tools/llvm_dialects/test/unit/interface/./DialectsADTTests'

I think this is the same error as we experienced previously, I am going to take a look at it.