OVERFLOW_AFTER_CHECK in sljitNativeX86_common.c
Dear colleagues, hello everyone! I started this issue because the static analyzer has detected OVERFLOW_AFTER_CHECK in sljitNativeX86_common.c and sljitNativeX86_64.c. I was recommended to contact you :) to solve the problem
What would be a possible solution?
The sljit has an optional argument validation system, which can assert or return with an error code if the arguments are invalid. It can be enabled with compile time macros. These checks are costly and recommended in debug mode. Please check the code starting here: https://github.com/zherczeg/sljit/blob/master/sljit_src/sljitLir.c#L1242
After the validation step, the arguments are not validated anymore. In this case, the layout of src/destination operands has a fixed bit layout regardless of cpu, and not all cpu uses all bits. The checkers are not cpu specific.