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

ilt_create needs additional checks #253

Open
flaviojs opened this issue Sep 28, 2024 · 0 comments
Open

ilt_create needs additional checks #253

flaviojs opened this issue Sep 28, 2024 · 0 comments

Comments

@flaviojs
Copy link
Contributor

When ilt_create loads data from cache it assumes that the data is valid.

For mips64 the stable and unstable versions support a different number of instructions, so they produce different results.
Since the filename is the same, what stable generates is wrong for unstable and vice versa.
At minimum, ilt_create needs to validate that the number of instructions loaded from the cache matches what is requested.

A more general approach is to compute a hash over the instructions (mask+value) and either use it in the filename, or store it inside the file to compare after load, or both.
The hash should produce different results when an instruction is reordered, added, removed, or modified (mask+value).

Bug was found while trying to test and debug x86 jit code being converted to rust.

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

1 participant