Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OVERFLOW_AFTER_CHECK in sljitNativeX86_common.c #268

Open
ellena13 opened this issue Aug 28, 2024 · 1 comment
Open

OVERFLOW_AFTER_CHECK in sljitNativeX86_common.c #268

ellena13 opened this issue Aug 28, 2024 · 1 comment

Comments

@ellena13
Copy link

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

@zherczeg
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants