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

When patching JITed code after become of a class, the class index can look like a negative number #873

Open
wants to merge 3 commits into
base: pharo-10
Choose a base branch
from

Conversation

tesonep
Copy link
Collaborator

@tesonep tesonep commented Nov 25, 2024

The classIndex that we read from the JITed code might be sign extended when encoding, so we need to guarantee that we bit mask it before using it and the correct types of the variables

…d when encoding, so we need to guarantee that we bit mask it before using it and the correct types of the variables
@tesonep tesonep assigned guillep and PalumboN and unassigned guillep and PalumboN Nov 25, 2024
Copy link
Collaborator

@PalumboN PalumboN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@guillep
Copy link
Member

guillep commented Nov 25, 2024

To me it looks strange. isValidClassTag: is written to assume that a correct 22bit index is passed as argument.
So it's the caller's fault then:

(objectMemory isValidClassTag: (backEnd inlineCacheTagAt: mcpc asInteger))

We should make sure that inlineCacheTagAt: always returns a valid index.

@tesonep
Copy link
Collaborator Author

tesonep commented Nov 25, 2024

It is true, I will change it, also I am writting a test

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

Successfully merging this pull request may close these issues.

3 participants