Currently the function void patchTemplateArgs in PrinterCapstone.cpp has logic that tries to find the source text between a template instantiation expression templateClass<...>, but this logic is flawed and goes into infinite loop when run on source code containing a certain pattern of comapriosn operators.
The exact condition causing the infinite loop can be found here https://github.com/capstone-engine/llvm-capstone/pull/83/files#r2298117354, and the reproducing test case is being run on the RISCV architecture to generate the CompressedInstructionsInfo file.
Currently the function
void patchTemplateArgsinPrinterCapstone.cpphas logic that tries to find the source text between a template instantiation expressiontemplateClass<...>, but this logic is flawed and goes into infinite loop when run on source code containing a certain pattern of comapriosn operators.The exact condition causing the infinite loop can be found here https://github.com/capstone-engine/llvm-capstone/pull/83/files#r2298117354, and the reproducing test case is being run on the RISCV architecture to generate the
CompressedInstructionsInfofile.